Permalink
Browse files

fixing response code in test

  • Loading branch information...
1 parent 3099f26 commit 7e6178e115c64032adb366dd466ebd401e6d240b @jeremytregunna committed Feb 7, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/trello/client.rb
  2. +1 −1 spec/client_spec.rb
View
@@ -35,8 +35,8 @@ def invoke_verb(name, uri, body = nil)
raise InvalidAccessToken, response.body
end
- unless [200, 201].include? response.code.to_i
- Trello.logger.error("[#{response.code.to_i} #{name.to_s.upcase} #{uri}]: #{response.body}")
+ unless [200, 201].include? response.code
+ Trello.logger.error("[#{response.code} #{name.to_s.upcase} #{uri}]: #{response.body}")
raise Error, response.body
end
View
@@ -45,7 +45,7 @@
it "raises an error when response has non-200 status" do
expected_error_message = "An error response"
response_with_non_200_status = stub "A fake OK response",
- :code => 201,
+ :code => 404,
:body => expected_error_message
TInternet.stub(:execute).and_return response_with_non_200_status

0 comments on commit 7e6178e

Please sign in to comment.