summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/services/projects/create_service.rb2
-rw-r--r--spec/services/projects/create_service_spec.rb7
2 files changed, 9 insertions, 0 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb
index 011f6f6145e..b35aed005da 100644
--- a/app/services/projects/create_service.rb
+++ b/app/services/projects/create_service.rb
@@ -85,6 +85,8 @@ module Projects
@project.create_wiki if @project.wiki_enabled?
+ @project.build_missing_services
+
event_service.create_project(@project, current_user)
system_hook_service.execute_hooks_for(@project, :create)
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index 3e3d85db858..66cdfd5d758 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -10,6 +10,13 @@ describe Projects::CreateService do
}
end
+ it 'creates services on Project creation' do
+ project = create_project(@user, @opts)
+ project.reload
+
+ expect(project.services).not_to be_empty
+ end
+
context 'user namespace' do
before do
@project = create_project(@user, @opts)