Browse Source

CLDC-3995: Answer option hh situation copy change (#3042)

* copy fix

* sofa surfing change

* Update test

* Update test
pull/3040/head^2
Manny Dinssa 1 week ago committed by GitHub
parent
commit
3a066a1c72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      app/models/form/lettings/questions/previous_tenure.rb
  2. 4
      spec/models/form/lettings/questions/previous_tenure_spec.rb
  3. 2
      spec/models/validations/household_validations_spec.rb

4
app/models/form/lettings/questions/previous_tenure.rb

@ -49,8 +49,8 @@ class Form::Lettings::Questions::PreviousTenure < ::Form::Question
"3" => { "value" => "Private sector tenancy" },
"27" => { "value" => "Owner occupation (low-cost home ownership)" },
"26" => { "value" => "Owner occupation (private)" },
"28" => { "value" => "Living with friends and family (long-term)" },
"39" => { "value" => "Sofa surfing (moving regularly between family and friends, no permanent bed)" },
"28" => { "value" => "Living with friends or family (long-term)" },
"39" => { "value" => "Sofa surfing (moving regularly between family or friends, no permanent bed)" },
"14" => { "value" => "Bed and breakfast" },
"7" => { "value" => "Direct access hostel" },
"10" => { "value" => "Hospital" },

4
spec/models/form/lettings/questions/previous_tenure_spec.rb

@ -70,8 +70,8 @@ RSpec.describe Form::Lettings::Questions::PreviousTenure, type: :model do
"3" => { "value" => "Private sector tenancy" },
"27" => { "value" => "Owner occupation (low-cost home ownership)" },
"26" => { "value" => "Owner occupation (private)" },
"28" => { "value" => "Living with friends and family (long-term)" },
"39" => { "value" => "Sofa surfing (moving regularly between family and friends, no permanent bed)" },
"28" => { "value" => "Living with friends or family (long-term)" },
"39" => { "value" => "Sofa surfing (moving regularly between family or friends, no permanent bed)" },
"14" => { "value" => "Bed and breakfast" },
"7" => { "value" => "Direct access hostel" },
"10" => { "value" => "Hospital" },

2
spec/models/validations/household_validations_spec.rb

@ -766,7 +766,7 @@ RSpec.describe Validations::HouseholdValidations do
record.referral = 1
record.prevten = prevten[:code]
household_validator.validate_previous_housing_situation(record)
label = record.form.start_year_2025_or_later? && prevten[:code] == 28 ? "Living with friends and family (long-term)" : prevten[:label]
label = record.form.start_year_2025_or_later? && prevten[:code] == 28 ? "Living with friends or family (long-term)" : prevten[:label]
expect(record.errors["prevten"])
.to include(match I18n.t("validations.lettings.household.prevten.internal_transfer", prevten: label))
expect(record.errors["referral"])

Loading…
Cancel
Save