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:
Joffrey JAFFEUX 2018-10-25 11:46:34 +02:00 committed by Régis Hanol
parent 2a77550f8c
commit 8e274f7296
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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")