diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-18 12:11:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-18 12:11:01 +0300 |
commit | 7bbc9509dc0567d2a2d8314e99179aaad33ba361 (patch) | |
tree | baa7501af6efe7a0f2f6e20f683e9da39fa96607 /spec/lib/api | |
parent | f6d22c8ba7c3f900a3843b1336e2ade1d8d90c1f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/api')
-rw-r--r-- | spec/lib/api/helpers_spec.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/spec/lib/api/helpers_spec.rb b/spec/lib/api/helpers_spec.rb index 11bbe825402..652727f371b 100644 --- a/spec/lib/api/helpers_spec.rb +++ b/spec/lib/api/helpers_spec.rb @@ -989,42 +989,5 @@ RSpec.describe API::Helpers do it_behaves_like 'authorized' end - - context 'when gitlab_shell_jwt_token is disabled' do - let(:valid_secret_token) { +'valid' } # mutable string to use chomp! - let(:invalid_secret_token) { +'invalid' } # mutable string to use chomp! - - before do - stub_feature_flags(gitlab_shell_jwt_token: false) - end - - context 'when shared secret is not provided' do - it_behaves_like 'unauthorized' - end - - context 'when shared secret provided via params' do - let(:params) { { 'secret_token' => valid_secret_token } } - - it_behaves_like 'authorized' - - context 'but it is invalid' do - let(:params) { { 'secret_token' => invalid_secret_token } } - - it_behaves_like 'unauthorized' - end - end - - context 'when shared secret provided via headers' do - let(:headers) { { described_class::GITLAB_SHARED_SECRET_HEADER => Base64.encode64(valid_secret_token) } } - - it_behaves_like 'authorized' - - context 'but it is invalid' do - let(:headers) { { described_class::GITLAB_SHARED_SECRET_HEADER => Base64.encode64(invalid_secret_token) } } - - it_behaves_like 'unauthorized' - end - end - end end end |