summaryrefslogtreecommitdiff
path: root/spec/workers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-19 21:44:05 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-19 21:44:05 +0300
commit85007434645c817e7674003bbdda0674287dd106 (patch)
tree416fa2c5278af126a72055a11db4b0f8c02771dc /spec/workers
parent95c23b2f974ec15e89cd7e762c80af0fa0ce57a5 (diff)
downloadgitlab-ce-85007434645c817e7674003bbdda0674287dd106.tar.gz
Post Receive Refactored. Service hooks also triggered now
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/post_receive_spec.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/spec/workers/post_receive_spec.rb b/spec/workers/post_receive_spec.rb
index 22e3e0d0fe5..bbc91f4474a 100644
--- a/spec/workers/post_receive_spec.rb
+++ b/spec/workers/post_receive_spec.rb
@@ -27,16 +27,12 @@ describe PostReceive do
PostReceive.perform(project.path, 'sha-old', 'sha-new', 'refs/heads/master', key_id).should be_false
end
- it "asks the project to execute web hooks" do
+ it "asks the project to trigger all hooks" do
Project.stub(find_by_path: project)
- project.should_receive(:execute_hooks).with('sha-old', 'sha-new', 'refs/heads/master', project.owner)
-
- PostReceive.perform(project.path, 'sha-old', 'sha-new', 'refs/heads/master', key_id)
- end
-
- it "asks the project to observe push/create event data" do
- Project.stub(find_by_path: project)
- project.should_receive(:observe_push).with('sha-old', 'sha-new', 'refs/heads/master', project.owner)
+ project.should_receive(:execute_hooks)
+ project.should_receive(:execute_services)
+ project.should_receive(:update_merge_requests)
+ project.should_receive(:observe_push)
PostReceive.perform(project.path, 'sha-old', 'sha-new', 'refs/heads/master', key_id)
end