Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-11-24 12:09:38 +0300
committerTiago <tiagonbotelho@hotmail.com>2017-11-28 15:28:31 +0300
commitb44f26ee957d0a02ceefb6c66a2523c8fd2d3d54 (patch)
tree1b1f9ecb63c8e86570417b960f31a2c4f2ee21cc /spec
parent1c21cb2bcc95e5a8015f5a3b3b824ed223a2d84a (diff)
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 (cherry picked from commit 89c9d2ad6b792885d234f153f2e13ee96639e4f8) 453b1780 Fix pulling and pushing using a personal access token with the sudo scope
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, []))