Commit bd948549 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

fix tests

parent e0b5e260
...@@ -38,11 +38,14 @@ describe Project, "Hooks" do ...@@ -38,11 +38,14 @@ describe Project, "Hooks" do
@project_hook = create(:project_hook) @project_hook = create(:project_hook)
@project_hook_2 = create(:project_hook) @project_hook_2 = create(:project_hook)
project.hooks << [@project_hook, @project_hook_2] project.hooks << [@project_hook, @project_hook_2]
stub_request(:post, @project_hook.url)
stub_request(:post, @project_hook_2.url)
end end
it "executes multiple web hook" do it "executes multiple web hook" do
@project_hook.should_receive(:execute).once @project_hook.should_receive(:async_execute).once
@project_hook_2.should_receive(:execute).once @project_hook_2.should_receive(:async_execute).once
project.trigger_post_receive('oldrev', 'newrev', 'refs/heads/master', @user) project.trigger_post_receive('oldrev', 'newrev', 'refs/heads/master', @user)
end 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