From 8549f7aa1e4d0bf58e79a572665b6fa35b83e9d0 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Tue, 7 Mar 2017 18:12:22 +0000 Subject: [PATCH] Fix access token specs de37dcee90ac44ba794ad504e91f18b8fb4b13a3 was a manual merge, which meant it didn't have a build, so I broke master :-( --- app/controllers/admin/impersonation_tokens_controller.rb | 2 +- spec/controllers/profiles/personal_access_tokens_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/impersonation_tokens_controller.rb b/app/controllers/admin/impersonation_tokens_controller.rb index d26004539b5..07c8bf714fc 100644 --- a/app/controllers/admin/impersonation_tokens_controller.rb +++ b/app/controllers/admin/impersonation_tokens_controller.rb @@ -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 diff --git a/spec/controllers/profiles/personal_access_tokens_spec.rb b/spec/controllers/profiles/personal_access_tokens_spec.rb index e1353406b32..dfed1de2046 100644 --- a/spec/controllers/profiles/personal_access_tokens_spec.rb +++ b/spec/controllers/profiles/personal_access_tokens_spec.rb @@ -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