diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb index 7e15bc24c..c4ce023bb 100644 --- a/app/models/validations/sales/sale_information_validations.rb +++ b/app/models/validations/sales/sale_information_validations.rb @@ -39,7 +39,7 @@ module Validations::Sales::SaleInformationValidations return unless record.fromprop && record.frombeds 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 :frombeds, I18n.t("validations.sale_information.previous_property_type.property_type_bedsit") record.errors.add :fromprop, I18n.t("validations.sale_information.previous_property_type.property_type_bedsit") end end diff --git a/config/locales/en.yml b/config/locales/en.yml index ff38756cf..0f5bd6aef 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -437,10 +437,8 @@ en: must_be_less_than_1_year_from_exdate: "Completion date must be less than 1 year after contract exchange date" must_be_less_than_3_years_from_hodate: "You told us completion date is more than 3 years after practical completion or handover date" must_be_after_hodate: "Completion date must be after practical completion or handover date" - previous_property_beds: - property_type_bedsit: "Bedsit bedroom maximum 1" previous_property_type: - property_type_bedsit: "A bedsit can not have more than 1 bedroom" + property_type_bedsit: "A bedsit cannot have more than 1 bedroom" discounted_ownership_value: "Mortgage, deposit, and grant total must equal £%{value_with_discount}" monthly_rent: higher_than_expected: "Basic monthly rent must be between £0 and £9,999" diff --git a/spec/models/validations/sales/sale_information_validations_spec.rb b/spec/models/validations/sales/sale_information_validations_spec.rb index 179935da7..fb9500956 100644 --- a/spec/models/validations/sales/sale_information_validations_spec.rb +++ b/spec/models/validations/sales/sale_information_validations_spec.rb @@ -166,7 +166,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["frombeds"]).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_type.property_type_bedsit")) end end end