diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-30 04:46:20 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-30 04:46:20 +0000 |
commit | d7437af3f31f388bf59b23a06c9bff5c8c5fd157 (patch) | |
tree | 992bc5e9b85094644aebfd45a4c0955a27fcfba4 /spec/lib/gitlab/api_authentication/token_resolver_spec.rb | |
parent | f981f6691d5395e04ee2858593135c448c10757d (diff) | |
download | gitlab-ce-d7437af3f31f388bf59b23a06c9bff5c8c5fd157.tar.gz |
Add latest changes from gitlab-org/security/gitlab@15-6-stable-ee
Diffstat (limited to 'spec/lib/gitlab/api_authentication/token_resolver_spec.rb')
-rw-r--r-- | spec/lib/gitlab/api_authentication/token_resolver_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/api_authentication/token_resolver_spec.rb b/spec/lib/gitlab/api_authentication/token_resolver_spec.rb index bbc6bf0d481..9f86b95651a 100644 --- a/spec/lib/gitlab/api_authentication/token_resolver_spec.rb +++ b/spec/lib/gitlab/api_authentication/token_resolver_spec.rb @@ -114,6 +114,18 @@ RSpec.describe Gitlab::APIAuthentication::TokenResolver do it_behaves_like 'an unauthorized request' end + + context 'when the external_authorization_service is enabled' do + before do + stub_application_setting(external_authorization_service_enabled: true) + end + + context 'with a valid deploy token' do + let(:raw) { username_and_password(token.username, token.token) } + + it_behaves_like 'an unauthorized request' + end + end end context 'with :personal_access_token' do |