summaryrefslogtreecommitdiff
path: root/spec/services/projects/destroy_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/projects/destroy_service_spec.rb')
-rw-r--r--spec/services/projects/destroy_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/projects/destroy_service_spec.rb b/spec/services/projects/destroy_service_spec.rb
index e436af77ed4..9a6f64b825a 100644
--- a/spec/services/projects/destroy_service_spec.rb
+++ b/spec/services/projects/destroy_service_spec.rb
@@ -241,6 +241,18 @@ describe Projects::DestroyService do
expect(destroy_project(project, user)).to be false
end
end
+
+ context 'when registry is disabled' do
+ before do
+ stub_container_registry_config(enabled: false)
+ end
+
+ it 'does not attempting to remove any tags' do
+ expect(Projects::ContainerRepository::DestroyService).not_to receive(:new)
+
+ destroy_project(project, user)
+ end
+ end
end
context 'when there are tags for legacy root repository' do