Browse Source

fix: update error message content to match Beth's choices

pull/1188/head
Sam Seed 3 years ago
parent
commit
813e04080e
  1. 4
      config/locales/en.yml
  2. 4
      spec/models/validations/sales/property_validations_spec.rb

4
config/locales/en.yml

@ -202,9 +202,9 @@ en:
beds:
non_positive: "Number of bedrooms has to be greater than 0"
over_max: "Number of bedrooms cannot be more than 12"
bedsits_have_max_one_bedroom: "Bedsits have at most one bedroom"
bedsits_have_max_one_bedroom: "Bedsit bedroom maximum 1"
proptype:
bedsits_have_max_one_bedroom: "Properties with 2 or more bedrooms cannot be bedsits"
bedsits_have_max_one_bedroom: "Bedsit maximum 1 bedroom"
postcode:
must_match_previous: "Buyer's last accommodation and discounted ownership postcodes must match"

4
spec/models/validations/sales/property_validations_spec.rb

@ -65,8 +65,8 @@ RSpec.describe Validations::Sales::PropertyValidations do
it "does add an error if it's a bedsit" do
property_validator.validate_bedsit_number_of_beds(record)
expect(record.errors.added? :proptype, "Properties with 2 or more bedrooms cannot be bedsits").to be true
expect(record.errors.added? :beds, "Bedsits have at most one bedroom").to be true
expect(record.errors.added? :proptype, "Bedsit maximum 1 bedroom").to be true
expect(record.errors.added? :beds, "Bedsit bedroom maximum 1").to be true
end
end
end

Loading…
Cancel
Save