From 02e101c998ee7b041f190526638155e518eef3e9 Mon Sep 17 00:00:00 2001 From: Dan Roberts Date: Fri, 13 Jan 2017 15:55:01 -0800 Subject: [PATCH] Fix some test bugs --- test/controllers/pets_controller_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/controllers/pets_controller_test.rb b/test/controllers/pets_controller_test.rb index 8a16d95..f6f3169 100644 --- a/test/controllers/pets_controller_test.rb +++ b/test/controllers/pets_controller_test.rb @@ -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)