Commit 7ada193e authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix specs for container repository destroy service

parent dce706bf
......@@ -14,7 +14,6 @@ describe "Container Registry" do
stub_container_registry_config(enabled: true)
stub_container_registry_tags(*tags)
project.container_repositories << container_repository unless container_repository.nil?
allow(Auth::ContainerRegistryAuthenticationService).to receive(:full_access_token).and_return('token')
end
describe 'GET /:project/container_registry' do
......
......@@ -13,6 +13,10 @@ describe ContainerImages::DestroyService, '#execute', :services do
container_repositories: [container_repository])
end
before do
stub_container_registry_config(enabled: true)
end
it { expect(container_repository).to be_valid }
it { expect(project.container_repositories).not_to be_empty }
......
......@@ -27,7 +27,8 @@ module StubGitlabCalls
def stub_container_registry_config(registry_settings)
allow(Gitlab.config.registry).to receive_messages(registry_settings)
allow(Auth::ContainerRegistryAuthenticationService).to receive(:full_access_token).and_return('token')
allow(Auth::ContainerRegistryAuthenticationService)
.to receive(:full_access_token).and_return('token')
end
def stub_container_registry_tags(*tags)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment