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