Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/groups/destroy_service_spec.rb')
-rw-r--r--spec/services/groups/destroy_service_spec.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/services/groups/destroy_service_spec.rb b/spec/services/groups/destroy_service_spec.rb
index f43f64fdf89..0d699dd447b 100644
--- a/spec/services/groups/destroy_service_spec.rb
+++ b/spec/services/groups/destroy_service_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Groups::DestroyService do
let!(:group) { create(:group) }
let!(:nested_group) { create(:group, parent: group) }
let!(:project) { create(:project, :repository, :legacy_storage, namespace: group) }
- let!(:notification_setting) { create(:notification_setting, source: group)}
+ let!(:notification_setting) { create(:notification_setting, source: group) }
let(:gitlab_shell) { Gitlab::Shell.new }
let(:remove_path) { group.path + "+#{group.id}+deleted" }
@@ -74,6 +74,17 @@ RSpec.describe Groups::DestroyService do
end
end
end
+
+ context 'event store', :sidekiq_might_not_need_inline do
+ it 'publishes a GroupDeletedEvent' do
+ expect { destroy_group(group, user, async) }
+ .to publish_event(Groups::GroupDeletedEvent)
+ .with(
+ group_id: group.id,
+ root_namespace_id: group.root_ancestor.id
+ )
+ end
+ end
end
describe 'asynchronous delete' do
@@ -271,7 +282,7 @@ RSpec.describe Groups::DestroyService do
end
context 'the shared_with group is deleted' do
- let!(:group2_subgroup) { create(:group, :private, parent: group2)}
+ let!(:group2_subgroup) { create(:group, :private, parent: group2) }
let!(:group2_subgroup_project) { create(:project, :private, group: group2_subgroup) }
it 'updates project authorizations so users of both groups lose access', :aggregate_failures do