diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-01-24 17:09:59 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-01-24 17:10:06 +0300 |
commit | 4564795195f4dafa3ff0578565fc13234b164a97 (patch) | |
tree | 0e3877a0748bd96cced0a971a432e7ef9b9a4651 /spec/services/issues/move_service_spec.rb | |
parent | 09da89e634c197919b129ad0f781c3cec9b93c37 (diff) |
Execute system hooks after-commit when executing project hooks
Diffstat (limited to 'spec/services/issues/move_service_spec.rb')
-rw-r--r-- | spec/services/issues/move_service_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/services/issues/move_service_spec.rb b/spec/services/issues/move_service_spec.rb index f3c98fa5416..388c9d63c7b 100644 --- a/spec/services/issues/move_service_spec.rb +++ b/spec/services/issues/move_service_spec.rb @@ -297,9 +297,11 @@ describe Issues::MoveService do end context 'project issue hooks' do - let(:hook) { create(:project_hook, project: old_project, issues_events: true) } + let!(:hook) { create(:project_hook, project: old_project, issues_events: true) } it 'executes project issue hooks' do + allow_any_instance_of(WebHookService).to receive(:execute) + # Ideally, we'd test that `WebHookWorker.jobs.size` increased by 1, # but since the entire spec run takes place in a transaction, we never # actually get to the `after_commit` hook that queues these jobs. |