Skip to content

Commit

Permalink
Fix some test bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Roberts committed Jan 13, 2017
1 parent 073f85e commit 02e101c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/controllers/pets_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ class PetsControllerTest < ActionDispatch::IntegrationTest
body.must_include "id"

# Check that the ID matches
Pet.find(body["id"]).name.must_equal pet_data["name"]
Pet.find(body["id"]).name.must_equal pet_data[:name]
end

it "Returns an error for an invalid pet" do
bad_data = pet_data.clone()
bad_data.delete("name")
bad_data.delete(:name)
assert_no_difference "Pet.count" do
post pets_url, params: { pet: bad_data }
assert_response :bad_response
assert_response :bad_request
end

body = JSON.parse(response.body)
Expand Down

0 comments on commit 02e101c

Please sign in to comment.