summaryrefslogtreecommitdiff
path: root/spec/services/auth
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-16 23:40:40 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-16 23:40:40 -0500
commitac6992ba682de08b79e5ddde08dbf566827e2f07 (patch)
tree8309357202f41c928b13b2d649cb50cd38011d04 /spec/services/auth
parent0a6c3494b0326de4cdc35d6369f48810d8403f5a (diff)
downloadgitlab-ce-ac6992ba682de08b79e5ddde08dbf566827e2f07.tar.gz
Fix specs
Diffstat (limited to 'spec/services/auth')
-rw-r--r--spec/services/auth/container_registry_authentication_service_spec.rb9
1 files changed, 7 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 d90e2982c4f..6c9f56a4fba 100644
--- a/spec/services/auth/container_registry_authentication_service_spec.rb
+++ b/spec/services/auth/container_registry_authentication_service_spec.rb
@@ -50,6 +50,11 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
end
end
+ shared_examples 'an unauthorized' do
+ it { is_expected.to include(http_status: 401) }
+ it { is_expected.to_not include(:token) }
+ end
+
shared_examples 'a forbidden' do
it { is_expected.to include(http_status: 403) }
it { is_expected.to_not include(:token) }
@@ -116,7 +121,7 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
{ offline_token: true }
end
- it_behaves_like 'a forbidden'
+ it_behaves_like 'an unauthorized'
end
context 'allow to pull and push images' do
@@ -179,7 +184,7 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
{ offline_token: true }
end
- it_behaves_like 'a forbidden'
+ it_behaves_like 'an unauthorized'
end
context 'for invalid scope' do