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"]]])
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 16 and 120"]]])
end
end
end
end
@ -165,7 +165,7 @@ RSpec.describe CaseLogsController, type: :request do
it"returns an error message"do
it"returns an error message"do
json_response=JSON.parse(response.body)
json_response=JSON.parse(response.body)
expect(json_response["errors"]).toeq({"person_1_age"=>["Tenant age must be an integer between 0 and 120"]})
expect(json_response["errors"]).toeq({"person_1_age"=>["Tenant age must be an integer between 16 and 120"]})