diff options
author | Drew Blessing <drew@blessing.io> | 2017-06-28 19:33:59 +0000 |
---|---|---|
committer | Drew Blessing <drew@gitlab.com> | 2017-06-28 15:51:11 -0500 |
commit | 309fc1978ec40725f9769f061e38157d0e83e0c7 (patch) | |
tree | 7bed857baf47f37b7fa3da79c1416da10ed900c5 | |
parent | 9f44687a14d57fec596b9736584bf8718df75a2e (diff) | |
download | gitlab-ce-auth_ominous_warning.tar.gz |
Add a hopefully clear and ominous warning about changing auth orderauth_ominous_warning
-rw-r--r-- | spec/lib/gitlab/auth_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index d09da951869..4fb411c810f 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -172,6 +172,11 @@ describe Gitlab::Auth, lib: true do expect(gl_auth).to receive(:rate_limit!).with('ip', success: false, login: '') expect(gl_auth.find_for_git_client('', nil, project: nil, ip: 'ip')).to eq(Gitlab::Auth::Result.new(nil, nil)) end + + it 'does not try password auth before personal access tokens' do + expect(gl_auth).not_to receive(:find_with_user_password) + gl_auth.find_for_git_client(user.email, token_w_api_scope.token, project: nil, ip: 'ip') + end end context 'while using regular user and password' do |