UX: bumps the user-api-key version to 3 (#6526)
* UX: bumps the user-api-key version to 3 * fix spec
This commit is contained in:
parent
2a77550f8c
commit
8e274f7296
|
@ -6,7 +6,7 @@ class UserApiKeysController < ApplicationController
|
|||
skip_before_action :redirect_to_login_if_required, only: [:new]
|
||||
skip_before_action :check_xhr, :preload_json
|
||||
|
||||
AUTH_API_VERSION ||= 2
|
||||
AUTH_API_VERSION ||= 3
|
||||
|
||||
def new
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ describe UserApiKeysController do
|
|||
it "supports a head request cleanly" do
|
||||
head "/user-api-key/new"
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.headers["Auth-Api-Version"]).to eq("2")
|
||||
expect(response.headers["Auth-Api-Version"]).to eq("3")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -156,7 +156,7 @@ describe UserApiKeysController do
|
|||
|
||||
expect(parsed["nonce"]).to eq(args[:nonce])
|
||||
expect(parsed["push"]).to eq(false)
|
||||
expect(parsed["api"]).to eq(2)
|
||||
expect(parsed["api"]).to eq(3)
|
||||
|
||||
key = user.user_api_keys.first
|
||||
expect(key.scopes).to include("push")
|
||||
|
|
Loading…
Reference in New Issue