Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-13 18:11:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-13 18:11:15 +0300
commit7134e029c59d015ccd10aa3bdad1299862947e19 (patch)
treeb06e2e3a8ccab3e76bc50425a7c4cc9957c39975 /spec/services/auth
parentd7ba2e953a7ee4c8ddcd2e5663f369eb5ecbcd72 (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.rb17
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