Commit 8549f7aa authored by Sean McGivern's avatar Sean McGivern

Fix access token specs

de37dcee was a manual merge, which meant
it didn't have a build, so I broke master :-(
parent 80898d91
...@@ -44,7 +44,7 @@ class Admin::ImpersonationTokensController < Admin::ApplicationController ...@@ -44,7 +44,7 @@ class Admin::ImpersonationTokensController < Admin::ApplicationController
end end
def set_index_vars def set_index_vars
@scopes = Gitlab::Auth::SCOPES @scopes = Gitlab::Auth::API_SCOPES
@impersonation_token ||= finder.build @impersonation_token ||= finder.build
@inactive_impersonation_tokens = finder(state: 'inactive').execute @inactive_impersonation_tokens = finder(state: 'inactive').execute
......
...@@ -15,10 +15,10 @@ describe Profiles::PersonalAccessTokensController do ...@@ -15,10 +15,10 @@ describe Profiles::PersonalAccessTokensController do
name = FFaker::Product.brand name = FFaker::Product.brand
scopes = %w[api read_user] scopes = %w[api read_user]
post :create, personal_access_token: token_attributes.merge(scopes: scopes) post :create, personal_access_token: token_attributes.merge(scopes: scopes, name: name)
expect(created_token).not_to be_nil expect(created_token).not_to be_nil
expect(created_token.name).to eq(token_attributes[:name]) expect(created_token.name).to eq(name)
expect(created_token.scopes).to eq(scopes) expect(created_token.scopes).to eq(scopes)
expect(PersonalAccessToken.active).to include(created_token) expect(PersonalAccessToken.active).to include(created_token)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment