Add a simple spec test.

This commit is contained in:
Marin Jankovski 2014-09-29 16:07:53 +02:00
parent fbc6f95a02
commit ab6459ad48
1 changed files with 2 additions and 0 deletions

View File

@ -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