Browse files

Add a test to ensure calling a build by branchname works.

  • Loading branch information...
1 parent 90f8062 commit 519666c9c758afa12be92352fe741fa7a8d59229 @cmeiklejohn cmeiklejohn committed May 26, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/test_cijoe_server.rb
View
6 test/test_cijoe_server.rb
@@ -82,6 +82,12 @@ def test_post_does_not_build_on_branch_mismatch
assert_equal 302, last_response.status
end
+ def test_post_builds_specific_branch
+ post "/?branch=branchname", :payload => {"ref" => "refs/heads/master"}.to_json
+ assert app.joe.building?
+ assert_equal 302, last_response.status
+ end
+
def test_post_does_build_on_branch_match
post "/", :payload => {"ref" => "refs/heads/master"}.to_json
assert app.joe.building?

0 comments on commit 519666c

Please sign in to comment.