expect(json_response["errors"]).tomatch_array([["property_number_of_times_relet",["Must be between 0 and 20"]],["person_1_age",["Tenant age must be between 0 and 120"]]])
expect(json_response["errors"]).tomatch_array([["property_number_of_times_relet",["Property number of times relet must be between 0 and 20"]],["person_1_age",["Tenant age must be an integer between 0 and 120"]]])
end
end
@ -165,7 +165,7 @@ RSpec.describe CaseLogsController, type: :request do
it"returns an error message"do
json_response=JSON.parse(response.body)
expect(json_response["errors"]).toeq({"person_1_age"=>["Tenant age must be between 0 and 120"]})
expect(json_response["errors"]).toeq({"person_1_age"=>["Tenant age must be an integer between 0 and 120"]})