summaryrefslogtreecommitdiff
path: root/spec/lib/container_registry/client_spec.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-06-07 11:55:04 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-06-07 11:59:57 +0200
commitefd62b76ccaadc95b14667f6f38e84d0f84b51ee (patch)
tree77d566562de7946e24043acdaca9353f3880f663 /spec/lib/container_registry/client_spec.rb
parent563ea34692a18d82d9d1bc481002f19b8a407508 (diff)
downloadgitlab-ce-efd62b76ccaadc95b14667f6f38e84d0f84b51ee.tar.gz
Enable Style/DotPosition Rubocop :cop:rubocop/gb/enable-dot-position-cop-leading-style
Diffstat (limited to 'spec/lib/container_registry/client_spec.rb')
-rw-r--r--spec/lib/container_registry/client_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/lib/container_registry/client_spec.rb b/spec/lib/container_registry/client_spec.rb
index ec03b533383..3df33f48adb 100644
--- a/spec/lib/container_registry/client_spec.rb
+++ b/spec/lib/container_registry/client_spec.rb
@@ -8,28 +8,28 @@ describe ContainerRegistry::Client do
describe '#blob' do
it 'GET /v2/:name/blobs/:digest' do
- stub_request(:get, "http://container-registry/v2/group/test/blobs/sha256:0123456789012345").
- with(headers: {
+ stub_request(:get, "http://container-registry/v2/group/test/blobs/sha256:0123456789012345")
+ .with(headers: {
'Accept' => 'application/octet-stream',
'Authorization' => "bearer #{token}"
- }).
- to_return(status: 200, body: "Blob")
+ })
+ .to_return(status: 200, body: "Blob")
expect(client.blob('group/test', 'sha256:0123456789012345')).to eq('Blob')
end
it 'follows 307 redirect for GET /v2/:name/blobs/:digest' do
- stub_request(:get, "http://container-registry/v2/group/test/blobs/sha256:0123456789012345").
- with(headers: {
+ stub_request(:get, "http://container-registry/v2/group/test/blobs/sha256:0123456789012345")
+ .with(headers: {
'Accept' => 'application/octet-stream',
'Authorization' => "bearer #{token}"
- }).
- to_return(status: 307, body: "", headers: { Location: 'http://redirected' })
+ })
+ .to_return(status: 307, body: "", headers: { Location: 'http://redirected' })
# We should probably use hash_excluding here, but that requires an update to WebMock:
# https://github.com/bblimke/webmock/blob/master/lib/webmock/matchers/hash_excluding_matcher.rb
- stub_request(:get, "http://redirected/").
- with { |request| !request.headers.include?('Authorization') }.
- to_return(status: 200, body: "Successfully redirected")
+ stub_request(:get, "http://redirected/")
+ .with { |request| !request.headers.include?('Authorization') }
+ .to_return(status: 200, body: "Successfully redirected")
response = client.blob('group/test', 'sha256:0123456789012345')