Commit 777456b2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

fix tests

parent 6b16f8a7
...@@ -91,19 +91,20 @@ describe GitPushService do ...@@ -91,19 +91,20 @@ describe GitPushService do
end end
end end
context "does not execute web hooks" do context "execute web hooks" do
before do before do
@project_hook = create(:project_hook) @project_hook = create(:project_hook)
project.hooks << [@project_hook] project.hooks << [@project_hook]
stub_request(:post, @project_hook.url)
end end
it "when pushing a branch for the first time" do it "when pushing a branch for the first time" do
@project_hook.should_not_receive(:execute) @project_hook.should_receive(:async_execute)
service.execute(project, user, @blankrev, 'newrev', 'refs/heads/master') service.execute(project, user, @blankrev, 'newrev', 'refs/heads/master')
end end
it "when pushing tags" do it "when pushing tags" do
@project_hook.should_not_receive(:execute) @project_hook.should_not_receive(:async_execute)
service.execute(project, user, 'newrev', 'newrev', 'refs/tags/v1.0.0') service.execute(project, user, 'newrev', 'newrev', 'refs/tags/v1.0.0')
end end
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