summaryrefslogtreecommitdiff
path: root/spec/services/groups
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2018-08-13 14:54:31 +0300
committerValery Sizov <valery@gitlab.com>2018-08-16 13:34:22 +0300
commit5fbb6ddf23da52cf68ed4f87137debfb6f30f6e8 (patch)
tree8e3267e7164b5ebe9fc925a9a682aa6b45b11c52 /spec/services/groups
parent3dd44f2b5355b080b4dc77dce97466e6a70b9e24 (diff)
downloadgitlab-ce-5fbb6ddf23da52cf68ed4f87137debfb6f30f6e8.tar.gz
Fix: Project deletion may not log audit events during group deletion49796-project-deletion-may-not-log-audit-events-during-group-deletion
Diffstat (limited to 'spec/services/groups')
-rw-r--r--spec/services/groups/destroy_service_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/services/groups/destroy_service_spec.rb b/spec/services/groups/destroy_service_spec.rb
index b54491cf5f9..d80d0f5a8a8 100644
--- a/spec/services/groups/destroy_service_spec.rb
+++ b/spec/services/groups/destroy_service_spec.rb
@@ -135,6 +135,17 @@ describe Groups::DestroyService do
it_behaves_like 'group destruction', false
end
+ context 'repository removal status is taken into account' do
+ it 'raises exception' do
+ expect_next_instance_of(::Projects::DestroyService) do |destroy_service|
+ expect(destroy_service).to receive(:execute).and_return(false)
+ end
+
+ expect { destroy_group(group, user, false) }
+ .to raise_error(Groups::DestroyService::DestroyError, "Project #{project.id} can't be deleted" )
+ end
+ end
+
describe 'repository removal' do
before do
destroy_group(group, user, false)