From 2c01612937203a51cc8231e94c9b942a7a65b3cc Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Mon, 30 Jan 2023 11:59:05 +0000 Subject: [PATCH] feat: update copy --- app/models/validations/sales/sale_information_validations.rb | 2 +- config/locales/en.yml | 2 +- .../validations/sales/sale_information_validations_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb index c42c42ccc..94a52934f 100644 --- a/app/models/validations/sales/sale_information_validations.rb +++ b/app/models/validations/sales/sale_information_validations.rb @@ -35,7 +35,7 @@ module Validations::Sales::SaleInformationValidations if record.frombeds != 1 && record.fromprop == 2 record.errors.add :frombeds, I18n.t("validations.sale_information.previous_property_beds.property_type_bedsit") - record.errors.add :fromprop, I18n.t("validations.sale_information.previous_property_type.property_type_bedsit") + record.errors.add :fromprop, I18n.t("validations.sale_information.previous_property_beds.property_type_bedsit") end end diff --git a/config/locales/en.yml b/config/locales/en.yml index c94f589ba..3da4b7a8d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -424,7 +424,7 @@ en: must_be_less_than_1_year_from_saledate: Contract exchange date must be less than 1 year before completion date previous_property_beds: - property_type_bedsit: "Bedsit bedroom maximum 1" + property_type_bedsit: "A bedsit cannot have more than 1 bedroom" discounted_ownership_value: "Mortgage, deposit, and grant total must equal £%{value_with_discount}" soft_validations: diff --git a/spec/models/validations/sales/sale_information_validations_spec.rb b/spec/models/validations/sales/sale_information_validations_spec.rb index d2921e8f0..b3db58679 100644 --- a/spec/models/validations/sales/sale_information_validations_spec.rb +++ b/spec/models/validations/sales/sale_information_validations_spec.rb @@ -159,7 +159,7 @@ RSpec.describe Validations::Sales::SaleInformationValidations do it "does add an error if it's a bedsit" do sale_information_validator.validate_previous_property_unit_type(record) - expect(record.errors["fromprop"]).to include(I18n.t("validations.sale_information.previous_property_type.property_type_bedsit")) + expect(record.errors["fromprop"]).to include(I18n.t("validations.sale_information.previous_property_beds.property_type_bedsit")) expect(record.errors["frombeds"]).to include(I18n.t("validations.sale_information.previous_property_beds.property_type_bedsit")) end end