Commit 668844f5 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix-specs-for-access-tokens' into 'master'

Fix access token specs

See merge request !9776
parents 57e70975 8549f7aa
......@@ -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
......
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