BigW Consortium Gitlab

Commit 8549f7aa by 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
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