diff options
author | Stan Hu <stanhu@gmail.com> | 2016-08-06 07:25:51 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-08-10 09:28:21 -0700 |
commit | 4955a47cb1c52168114364e45a2fccf6bc105452 (patch) | |
tree | 50bb5ea1979a596edef53817aea75796686fc2a9 /spec/models/hooks | |
parent | ae2d3c417075c83e169ab7662f3dd11e3b2bf043 (diff) | |
download | gitlab-ce-clean-up-project-destroy.tar.gz |
Clean up project destructionclean-up-project-destroy
Instead of redirecting from the project service to the service and back to the model,
put all destruction code in the service. Also removes a possible source of failure
where run_after_commit may not destroy the project.
Diffstat (limited to 'spec/models/hooks')
-rw-r--r-- | spec/models/hooks/system_hook_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/hooks/system_hook_spec.rb b/spec/models/hooks/system_hook_spec.rb index 4078b9e4ff5..cbdf7eec082 100644 --- a/spec/models/hooks/system_hook_spec.rb +++ b/spec/models/hooks/system_hook_spec.rb @@ -38,7 +38,7 @@ describe SystemHook, models: true do end it "project_destroy hook" do - Projects::DestroyService.new(project, user, {}).pending_delete! + Projects::DestroyService.new(project, user, {}).async_execute expect(WebMock).to have_requested(:post, system_hook.url).with( body: /project_destroy/, |