summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-11-24 09:09:38 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-11-24 09:09:38 +0000
commit89c9d2ad6b792885d234f153f2e13ee96639e4f8 (patch)
treeaeafc6639041b20cce6c09aff29b17704adb0dd8 /spec/lib
parentfad4ab7d56ea1deb415adff541212ae901e31fd4 (diff)
parent453b17809395fda045f5685268cae58c1dceb881 (diff)
downloadgitlab-ce-89c9d2ad6b792885d234f153f2e13ee96639e4f8.tar.gz
Merge branch 'dm-fix-registry-with-sudo-token' into 'master'
Fix pulling and pushing using a personal access token with the sudo scope Closes #40466 See merge request gitlab-org/gitlab-ce!15571
Diffstat (limited to 'spec/lib')
-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 5e822a0026a..a6fbec295b5 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, []))