From 4d96036db781e89fb09e642e82f0a1247d9a31bf Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Tue, 8 Mar 2022 17:04:57 +0000 Subject: [PATCH] Update error message --- config/locales/en.yml | 2 +- spec/requests/case_logs_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 96238ac39..d12912794 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -38,7 +38,7 @@ en: other_field_missing: "If %{main_field_label} is other then %{other_field_label} must be provided" other_field_not_required: "%{other_field_label} must not be provided if %{main_field_label} was not other" numeric: - valid: "%{field} must be an integer between %{min} and %{max}" + valid: "%{field} must be a number between %{min} and %{max}" date: invalid_date: "Please enter a valid date" outside_collection_window: "Date must be within the current collection windows" diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb index 050e7b606..4c396aaa7 100644 --- a/spec/requests/case_logs_controller_spec.rb +++ b/spec/requests/case_logs_controller_spec.rb @@ -345,7 +345,7 @@ RSpec.describe CaseLogsController, type: :request do it "returns an error message" do json_response = JSON.parse(response.body) - expect(json_response["errors"]).to eq({ "age1" => ["Lead tenant’s age must be an integer between 16 and 120"] }) + expect(json_response["errors"]).to eq({ "age1" => ["Lead tenant’s age must be a number between 16 and 120"] }) end end