Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
Add failing test example
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaigle committed Apr 1, 2015
1 parent 62dfb25 commit 1e6c092
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/bamboo_test.rb
Expand Up @@ -44,6 +44,19 @@ def test_triggers_build_with_context_path
end

def test_passes_build_error
@stubs.post "/rest/api/latest/queue/ABC" do |env|
error_response(500, "Configuration Error")
end

svc = service :push, data, payload
assert_raises Service::ConfigurationError do
svc.receive
end

@stubs.verify_stubbed_calls
end

def test_passes_error_with_xml_parsing
@stubs.post "/rest/api/latest/queue/ABC" do |env|
error_response(404, "Plan ABC not found")
end
Expand Down

0 comments on commit 1e6c092

Please sign in to comment.