diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/services/auth/container_registry_authentication_service_spec.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/services/auth/container_registry_authentication_service_spec.rb')
-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 |