diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-10-10 10:40:14 +0300 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-10-13 18:23:24 +0300 |
commit | bba47886264d0ca7650d2b4b202d69984650b0ae (patch) | |
tree | 30db5a4e0548d75919482485de4b7fdf971799c5 /spec/workers/post_receive_spec.rb | |
parent | 6d48c489d93d6dcbdfd955b7456d97ba6cdb23d1 (diff) |
Extract project#update_merge_requests and SystemHooks to its own worker from GitPushService
Diffstat (limited to 'spec/workers/post_receive_spec.rb')
-rw-r--r-- | spec/workers/post_receive_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/workers/post_receive_spec.rb b/spec/workers/post_receive_spec.rb index ffeaafe654a..984acdade36 100644 --- a/spec/workers/post_receive_spec.rb +++ b/spec/workers/post_receive_spec.rb @@ -92,7 +92,13 @@ describe PostReceive do allow(Project).to receive(:find_with_namespace).and_return(project) expect(project).to receive(:execute_hooks).twice expect(project).to receive(:execute_services).twice - expect(project).to receive(:update_merge_requests) + + PostReceive.new.perform(pwd(project), key_id, base64_changes) + end + + it "enqueues a UpdateMergeRequestsWorker job" do + allow(Project).to receive(:find_with_namespace).and_return(project) + expect(UpdateMergeRequestsWorker).to receive(:perform_async).with(project.id, project.owner.id, any_args) PostReceive.new.perform(pwd(project), key_id, base64_changes) end |