diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-03 10:38:37 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-03 10:38:37 +0200 |
commit | 662d2e68173ecc8ee1bfe9dddf8cc38766bd310b (patch) | |
tree | 0366d87576231f7c3da07a54ee9bfa6955794810 /spec/support/stub_gitlab_calls.rb | |
parent | fc550b398be6cdc4584dad79411929305815ffaa (diff) | |
download | gitlab-ce-662d2e68173ecc8ee1bfe9dddf8cc38766bd310b.tar.gz |
Refactor feature specs for container registry
Diffstat (limited to 'spec/support/stub_gitlab_calls.rb')
-rw-r--r-- | spec/support/stub_gitlab_calls.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb index 3949784aabb..dbf3ace37c3 100644 --- a/spec/support/stub_gitlab_calls.rb +++ b/spec/support/stub_gitlab_calls.rb @@ -32,15 +32,15 @@ module StubGitlabCalls end def stub_container_registry_tags(*tags) - allow_any_instance_of(ContainerRegistry::Client).to receive(:repository_tags).and_return( - { "tags" => tags } - ) - allow_any_instance_of(ContainerRegistry::Client).to receive(:repository_manifest).and_return( - JSON.parse(File.read(Rails.root + 'spec/fixtures/container_registry/tag_manifest.json')) - ) + allow_any_instance_of(ContainerRegistry::Client) + .to receive(:repository_tags).and_return({ 'tags' => tags }) + + allow_any_instance_of(ContainerRegistry::Client) + .to receive(:repository_manifest).and_return( + JSON.parse(File.read(Rails.root + 'spec/fixtures/container_registry/tag_manifest.json'))) + allow_any_instance_of(ContainerRegistry::Client).to receive(:blob).and_return( - File.read(Rails.root + 'spec/fixtures/container_registry/config_blob.json') - ) + File.read(Rails.root + 'spec/fixtures/container_registry/config_blob.json')) end private |