Fix access token specs
de37dcee90
was a manual merge, which meant
it didn't have a build, so I broke master :-(
This commit is contained in:
parent
80898d91ec
commit
8549f7aa1e
|
@ -44,7 +44,7 @@ class Admin::ImpersonationTokensController < Admin::ApplicationController
|
|||
end
|
||||
|
||||
def set_index_vars
|
||||
@scopes = Gitlab::Auth::SCOPES
|
||||
@scopes = Gitlab::Auth::API_SCOPES
|
||||
|
||||
@impersonation_token ||= finder.build
|
||||
@inactive_impersonation_tokens = finder(state: 'inactive').execute
|
||||
|
|
|
@ -15,10 +15,10 @@ describe Profiles::PersonalAccessTokensController do
|
|||
name = FFaker::Product.brand
|
||||
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.name).to eq(token_attributes[:name])
|
||||
expect(created_token.name).to eq(name)
|
||||
expect(created_token.scopes).to eq(scopes)
|
||||
expect(PersonalAccessToken.active).to include(created_token)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue