Browse Source

feat: update copy (#2357)

pull/2354/head^2
natdeanlewissoftwire 9 months ago committed by GitHub
parent
commit
da0d27c8f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      app/models/form/lettings/questions/reason.rb
  2. 8
      app/models/form/lettings/questions/reason_renewal.rb
  3. 2
      config/locales/en.yml
  4. 8
      spec/models/form/lettings/questions/reason_renewal_spec.rb
  5. 8
      spec/models/form/lettings/questions/reason_spec.rb
  6. 2
      spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb

8
app/models/form/lettings/questions/reason.rb

@ -18,10 +18,10 @@ class Form::Lettings::Questions::Reason < ::Form::Question
def answer_options
if form.start_year_after_2024?
{
"50" => { "value" => "End of social housing tenancy - no fault" },
"51" => { "value" => "End of social housing tenancy - evicted due to anti-social behaviour (ASB)" },
"52" => { "value" => "End of social housing tenancy - evicted due to rent arrears" },
"53" => { "value" => "End of social housing tenancy - evicted for any other reason" },
"50" => { "value" => "End of social or private sector tenancy - no fault" },
"51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" },
"52" => { "value" => "End of social or private sector tenancy - evicted due to rent arrears" },
"53" => { "value" => "End of social or private sector tenancy - evicted for any other reason" },
"1" => { "value" => "Permanently decanted from another property owned by this landlord" },
"2" => { "value" => "Left home country as a refugee" },
"45" => { "value" => "Discharged from prison" },

8
app/models/form/lettings/questions/reason_renewal.rb

@ -18,10 +18,10 @@ class Form::Lettings::Questions::ReasonRenewal < ::Form::Question
def answer_options
if form.start_year_after_2024?
{
"50" => { "value" => "End of social housing tenancy - no fault" },
"51" => { "value" => "End of social housing tenancy - evicted due to anti-social behaviour (ASB)" },
"52" => { "value" => "End of social housing tenancy - evicted due to rent arrears" },
"53" => { "value" => "End of social housing tenancy - evicted for any other reason" },
"50" => { "value" => "End of social or private sector tenancy - no fault" },
"51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" },
"52" => { "value" => "End of social or private sector tenancy - evicted due to rent arrears" },
"53" => { "value" => "End of social or private sector tenancy - evicted for any other reason" },
"20" => { "value" => "Other" },
"47" => { "value" => "Tenant prefers not to say" },
"divider" => { "value" => true },

2
config/locales/en.yml

@ -554,7 +554,7 @@ en:
reason:
not_internal_transfer: "Answer cannot be ‘permanently decanted from another property owned by this landlord’ as you told us the source of referral for this tenancy was not an internal transfer"
renewal_reason_needed: 'The reason for leaving must be "End of assured shorthold tenancy - no fault" or "End of fixed term tenancy - no fault" if the letting is a renewal'
renewal_reason_needed_2024: 'The reason for leaving must be "End of social housing tenancy - no fault", "End of social housing tenancy - evicted due to anti-social behaviour (ASB)", "End of social housing tenancy - evicted due to rent arrears" or "End of social housing tenancy - evicted for any other reason"'
renewal_reason_needed_2024: 'The reason for leaving must be "End of social or private sector tenancy - no fault", "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)", "End of social or private sector tenancy - evicted due to rent arrears" or "End of social or private sector tenancy - evicted for any other reason"'
other_not_settled: "Please give the reason for the tenant leaving their last settled home. This is where they were living before they became homeless, were living in temporary accommodation or sleeping rough"
condition_effects:
no_choices: "You cannot answer this question as you told us nobody in the household has a physical or mental health condition (or other illness) expected to last 12 months or more"

8
spec/models/form/lettings/questions/reason_renewal_spec.rb

@ -71,10 +71,10 @@ RSpec.describe Form::Lettings::Questions::ReasonRenewal, type: :model do
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"50" => { "value" => "End of social housing tenancy - no fault" },
"51" => { "value" => "End of social housing tenancy - evicted due to anti-social behaviour (ASB)" },
"52" => { "value" => "End of social housing tenancy - evicted due to rent arrears" },
"53" => { "value" => "End of social housing tenancy - evicted for any other reason" },
"50" => { "value" => "End of social or private sector tenancy - no fault" },
"51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" },
"52" => { "value" => "End of social or private sector tenancy - evicted due to rent arrears" },
"53" => { "value" => "End of social or private sector tenancy - evicted for any other reason" },
"20" => { "value" => "Other" },
"47" => { "value" => "Tenant prefers not to say" },
"divider" => { "value" => true },

8
spec/models/form/lettings/questions/reason_spec.rb

@ -105,10 +105,10 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"50" => { "value" => "End of social housing tenancy - no fault" },
"51" => { "value" => "End of social housing tenancy - evicted due to anti-social behaviour (ASB)" },
"52" => { "value" => "End of social housing tenancy - evicted due to rent arrears" },
"53" => { "value" => "End of social housing tenancy - evicted for any other reason" },
"50" => { "value" => "End of social or private sector tenancy - no fault" },
"51" => { "value" => "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)" },
"52" => { "value" => "End of social or private sector tenancy - evicted due to rent arrears" },
"53" => { "value" => "End of social or private sector tenancy - evicted for any other reason" },
"1" => { "value" => "Permanently decanted from another property owned by this landlord" },
"2" => { "value" => "Left home country as a refugee" },
"45" => { "value" => "Discharged from prison" },

2
spec/services/bulk_upload/lettings/year2024/row_parser_spec.rb

@ -1038,7 +1038,7 @@ RSpec.describe BulkUpload::Lettings::Year2024::RowParser do
let(:attributes) { { bulk_upload:, field_98: "1", field_7: "1" } }
it "is not permitted" do
expect(parser.errors[:field_98]).to include('The reason for leaving must be "End of social housing tenancy - no fault", "End of social housing tenancy - evicted due to anti-social behaviour (ASB)", "End of social housing tenancy - evicted due to rent arrears" or "End of social housing tenancy - evicted for any other reason"')
expect(parser.errors[:field_98]).to include('The reason for leaving must be "End of social or private sector tenancy - no fault", "End of social or private sector tenancy - evicted due to anti-social behaviour (ASB)", "End of social or private sector tenancy - evicted due to rent arrears" or "End of social or private sector tenancy - evicted for any other reason"')
end
end
end

Loading…
Cancel
Save