Commit eb50944f authored by Toon Claes's avatar Toon Claes

Remove after_create hook

And place #track_project_repository in Projects::CreateService
instead.
parent 701b4d70
......@@ -120,8 +120,6 @@ class Project < ActiveRecord::Base
after_create :ensure_storage_path_exists
after_save :ensure_storage_path_exists, if: :namespace_id_changed?
after_create :track_project_repository
acts_as_ordered_taggable
attr_accessor :old_path_with_namespace
......
......@@ -88,6 +88,8 @@ module Projects
@project.create_wiki unless skip_wiki?
end
@project.track_project_repository
event_service.create_project(@project, current_user)
system_hook_service.execute_hooks_for(@project, :create)
......
......@@ -11,6 +11,7 @@ describe ProjectRepository do
describe '.find_project' do
it 'finds project by disk path' do
project = create(:project)
project.track_project_repository
expect(described_class.find_project(project.disk_path)).to eq(project)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment