Commit bd948549293e1abfa32ec566b687670fed47a3d7
1 parent
e0b5e260
Exists in
master
and in
4 other branches
fix tests
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
spec/models/project_hooks_spec.rb
| ... | ... | @@ -38,11 +38,14 @@ describe Project, "Hooks" do |
| 38 | 38 | @project_hook = create(:project_hook) |
| 39 | 39 | @project_hook_2 = create(:project_hook) |
| 40 | 40 | project.hooks << [@project_hook, @project_hook_2] |
| 41 | + | |
| 42 | + stub_request(:post, @project_hook.url) | |
| 43 | + stub_request(:post, @project_hook_2.url) | |
| 41 | 44 | end |
| 42 | 45 | |
| 43 | 46 | it "executes multiple web hook" do |
| 44 | - @project_hook.should_receive(:execute).once | |
| 45 | - @project_hook_2.should_receive(:execute).once | |
| 47 | + @project_hook.should_receive(:async_execute).once | |
| 48 | + @project_hook_2.should_receive(:async_execute).once | |
| 46 | 49 | |
| 47 | 50 | project.trigger_post_receive('oldrev', 'newrev', 'refs/heads/master', @user) |
| 48 | 51 | end | ... | ... |