diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-13 18:11:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-13 18:11:15 +0300 |
commit | 7134e029c59d015ccd10aa3bdad1299862947e19 (patch) | |
tree | b06e2e3a8ccab3e76bc50425a7c4cc9957c39975 /spec/services/auth | |
parent | d7ba2e953a7ee4c8ddcd2e5663f369eb5ecbcd72 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/auth')
-rw-r--r-- | spec/services/auth/container_registry_authentication_service_spec.rb | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb index 4124696ac08..b456f7a2745 100644 --- a/spec/services/auth/container_registry_authentication_service_spec.rb +++ b/spec/services/auth/container_registry_authentication_service_spec.rb @@ -17,11 +17,6 @@ RSpec.describe Auth::ContainerRegistryAuthenticationService do project.add_developer(current_user) end - shared_examples 'an unmodified token' do - it_behaves_like 'a valid token' - it { expect(payload['access']).not_to include(have_key('migration_eligible')) } - end - shared_examples 'a modified token with migration eligibility' do |eligible| it_behaves_like 'a valid token' it { expect(payload['access']).to include(include('migration_eligible' => eligible)) } @@ -71,7 +66,7 @@ RSpec.describe Auth::ContainerRegistryAuthenticationService do { scopes: ["repository:#{project.full_path}:pull"] } end - it_behaves_like 'an unmodified token' + it_behaves_like 'a modified token' end context 'with push action' do @@ -82,20 +77,12 @@ RSpec.describe Auth::ContainerRegistryAuthenticationService do it_behaves_like 'a modified token' end - context 'with multiple actions including push' do + context 'with multiple actions' do let(:current_params) do { scopes: ["repository:#{project.full_path}:pull,push,delete"] } end it_behaves_like 'a modified token' end - - context 'with multiple actions excluding push' do - let(:current_params) do - { scopes: ["repository:#{project.full_path}:pull,delete"] } - end - - it_behaves_like 'an unmodified token' - end end end |