summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-04-07 10:35:00 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-04-07 10:35:00 +0200
commitb38439a3ae3c7ea1675b7037e4882213bdc58fdf (patch)
tree5d3c9aaa712b30a835e3d8e649acd95d2dc640f1 /spec
parent5bc58bac2678aed9c8b2318f9f4d4825baa2b110 (diff)
downloadgitlab-ce-b38439a3ae3c7ea1675b7037e4882213bdc58fdf.tar.gz
Use proper auth_scope for deploy token
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/auth_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb
index e3ec707076a..9ccd0b206cc 100644
--- a/spec/lib/gitlab/auth_spec.rb
+++ b/spec/lib/gitlab/auth_spec.rb
@@ -195,7 +195,7 @@ describe Gitlab::Auth do
personal_access_token = create(:personal_access_token, scopes: ['read_registry'])
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, [:build_read_container_image]))
+ 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, [:read_container_image]))
end
end
@@ -317,7 +317,7 @@ describe Gitlab::Auth do
end
it 'succeeds when login and token are valid' do
- auth_success = Gitlab::Auth::Result.new(deploy_token, project, :deploy_token, [:build_read_container_image])
+ auth_success = Gitlab::Auth::Result.new(deploy_token, project, :deploy_token, [:read_container_image])
expect(gl_auth).to receive(:rate_limit!).with('ip', success: true, login: login)
expect(gl_auth.find_for_git_client(login, deploy_token.token, project: nil, ip: 'ip'))