Commit ab6459ad authored by Marin Jankovski's avatar Marin Jankovski

Add a simple spec test.

parent fbc6f95a
......@@ -105,6 +105,8 @@ describe GitPushService do
context "execute web hooks" do
it "when pushing a branch for the first time" do
project.should_receive(:execute_hooks)
project.default_branch.should == "master"
project.protected_branches.should_receive(:create).with({ name: "master" })
service.execute(project, user, @blankrev, 'newrev', 'refs/heads/master')
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