summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-11-23 12:41:29 +0100
committerDouwe Maan <douwe@selenight.nl>2017-11-23 16:32:08 +0100
commit453b17809395fda045f5685268cae58c1dceb881 (patch)
treec02bac315c2d5d66417c52649a5951ddbffecdd1 /spec
parent7084c096732dcd041fbdcd22ba17233941683c04 (diff)
downloadgitlab-ce-453b17809395fda045f5685268cae58c1dceb881.tar.gz
Fix pulling and pushing using a personal access token with the sudo scopedm-fix-registry-with-sudo-token
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/auth_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb
index 3164d2ebf04..8677e53a204 100644
--- a/spec/lib/gitlab/auth_spec.rb
+++ b/spec/lib/gitlab/auth_spec.rb
@@ -207,7 +207,7 @@ describe Gitlab::Auth do
end
it 'limits abilities based on scope' do
- personal_access_token = create(:personal_access_token, scopes: ['read_user'])
+ personal_access_token = create(:personal_access_token, scopes: %w[read_user sudo])
expect(gl_auth).to receive(:rate_limit!).with('ip', success: true, login: '')
expect(gl_auth.find_for_git_client('', personal_access_token.token, project: nil, ip: 'ip')).to eq(Gitlab::Auth::Result.new(personal_access_token.user, nil, :personal_access_token, []))