summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVratislav Kalenda <v.kalenda@gmail.com>2017-10-10 23:46:18 +0200
committerVratislav Kalenda <v.kalenda@gmail.com>2017-10-10 23:46:18 +0200
commit3d744009ed3f27daefb5d898f6e8b848a3630928 (patch)
tree67c8e357cde86418cf2b39a0b9aa6ccd08684356
parent2420d83872e36d66f9f9f542a0956df95cf009fd (diff)
downloadgitlab-ce-3d744009ed3f27daefb5d898f6e8b848a3630928.tar.gz
fix code style issues
-rw-r--r--spec/services/auth/container_registry_authentication_service_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb
index 2a147cd2773..9128280eb5a 100644
--- a/spec/services/auth/container_registry_authentication_service_spec.rb
+++ b/spec/services/auth/container_registry_authentication_service_spec.rb
@@ -52,7 +52,10 @@ describe Auth::ContainerRegistryAuthenticationService do
it_behaves_like 'a valid token'
it_behaves_like 'not a container repository factory'
- it { expect(payload).to include('access' => access) }
+
+ it 'has the correct scope' do
+ expect(payload).to include('access' => access)
+ end
end
shared_examples 'an accessible' do
@@ -63,7 +66,10 @@ describe Auth::ContainerRegistryAuthenticationService do
end
it_behaves_like 'a valid token'
- it { expect(payload).to include('access' => access) }
+
+ it 'has the correct scope' do
+ expect(payload).to include('access' => access)
+ end
end
shared_examples 'an inaccessible' do
@@ -515,6 +521,7 @@ describe Auth::ContainerRegistryAuthenticationService do
context 'registry catalog browsing authorized as admin' do
let(:current_user) { create(:user, :admin) }
+
let(:current_params) do
{ scope: "registry:catalog:*" }
end
@@ -573,6 +580,7 @@ describe Auth::ContainerRegistryAuthenticationService do
let(:current_params) do
{ scope: "registry:catalog:*" }
end
+
it_behaves_like 'a forbidden'
it_behaves_like 'not a container repository factory'
end