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/projects/update_service_spec.rb')
-rw-r--r--spec/services/projects/update_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb
index ca838be0fa8..85d3e99109d 100644
--- a/spec/services/projects/update_service_spec.rb
+++ b/spec/services/projects/update_service_spec.rb
@@ -348,6 +348,18 @@ RSpec.describe Projects::UpdateService do
end
end
+ context 'when archiving a project' do
+ it 'publishes a ProjectTransferedEvent' do
+ expect { update_project(project, user, archived: true) }
+ .to publish_event(Projects::ProjectArchivedEvent)
+ .with(
+ project_id: project.id,
+ namespace_id: project.namespace_id,
+ root_namespace_id: project.root_namespace.id
+ )
+ end
+ end
+
context 'when changing operations feature visibility' do
let(:feature_params) { { operations_access_level: ProjectFeature::DISABLED } }