diff --git a/app/models/case_log.rb b/app/models/case_log.rb index bfcf09913..0567342b9 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -49,7 +49,7 @@ class CaseLog < ApplicationRecord scope :for_organisation, ->(org) { where(owning_organisation: org).or(where(managing_organisation: org)) } enum status: STATUS - enum letting_in_sheltered_accomodation: SHELTERED_ACCOMODATION + enum letting_in_sheltered_accommodation: SHELTERED_ACCOMMODATION enum ethnic: ETHNIC enum national: NATIONAL, _suffix: true enum ecstat1: ECSTAT, _suffix: true diff --git a/app/models/constants/case_log.rb b/app/models/constants/case_log.rb index e579d0b4f..ba9aa508a 100644 --- a/app/models/constants/case_log.rb +++ b/app/models/constants/case_log.rb @@ -108,7 +108,7 @@ module Constants::CaseLog "Private sector tenancy" => 3, "Tied housing or rented with job" => 4, "Supported housing" => 6, - "Sheltered accomodation" => 8, + "Sheltered accommodation" => 8, "Residential care home" => 9, "Living with friends or family" => 28, "Refuge" => 21, @@ -263,10 +263,10 @@ module Constants::CaseLog "Couldn't afford rent or mortgage - other" => 39, "To move nearer to family, friends or school" => 16, "To move nearer to work" => 17, - "To move to accomodation with support" => 18, - "To move to independent accomodation" => 19, + "To move to accommodation with support" => 18, + "To move to independent accommodation" => 19, "Hate crime" => 31, - "Death of household member in last settled accomodation" => 46, + "Death of household member in last settled accommodation" => 46, "Discharged from prison" => 44, "Discharged from long stay hospital or similar institution" => 45, "Other" => 20, @@ -1088,7 +1088,7 @@ module Constants::CaseLog "completed" => 2, }.freeze - SHELTERED_ACCOMODATION = { + SHELTERED_ACCOMMODATION = { "Yes - sheltered housing" => 1, "Yes - extra care housing" => 2, "No" => 3, @@ -1120,7 +1120,7 @@ module Constants::CaseLog NON_TEMP_ACCOMMODATION = ["Tied housing or rented with job", "Supported housing", - "Sheltered accomodation", + "Sheltered accommodation", "Home Office Asylum Support", "Other"].freeze diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 54ddcda51..70a142646 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -1286,12 +1286,12 @@ "30": { "value": "To move to independent accomodation" }, - "divider": { - "value": true - }, "31": { "value": "Other" }, + "divider": { + "value": true + }, "32": { "value": "Don’t know" }, @@ -1300,9 +1300,7 @@ } }, "conditional_for": { - "other_reason_for_leaving_last_settled_home": [ - "Other" - ] + "other_reason_for_leaving_last_settled_home": ["Other"] } }, "other_reason_for_leaving_last_settled_home": { @@ -2313,9 +2311,7 @@ } }, "conditional_for": { - "tenancyother": [ - "Other" - ] + "tenancyother": ["Other"] } }, "tenancyother": { @@ -2357,9 +2353,7 @@ } }, "conditional_for": { - "tenancyother": [ - "Other" - ] + "tenancyother": ["Other"] } }, "tenancyother": { @@ -2397,11 +2391,11 @@ } ] }, - "letting_in_sheltered_accomodation": { + "letting_in_sheltered_accommodation": { "header": "", "description": "", "questions": { - "letting_in_sheltered_accomodation": { + "letting_in_sheltered_accommodation": { "check_answer_label": "Is this letting in sheltered accommodation?", "header": "Is this letting in sheltered accommodation?", "hint_text": "", @@ -2459,9 +2453,7 @@ } }, "conditional_for": { - "property_postcode": [ - "Yes" - ] + "property_postcode": ["Yes"] }, "hidden_in_check_answers": true }, @@ -3192,9 +3184,7 @@ } }, "conditional_for": { - "mrcdate": [ - "Yes" - ] + "mrcdate": ["Yes"] } }, "mrcdate": { @@ -3271,9 +3261,18 @@ "width": 5, "prefix": "£", "suffix": [ - { "label": "every week", "depends_on" : { "incfreq": "Weekly" } }, - { "label": "every month", "depends_on" : { "incfreq": "Monthly" } }, - { "label": "every month", "depends_on" : { "incfreq": "Yearly" } } + { + "label": "every week", + "depends_on": { "incfreq": "Weekly" } + }, + { + "label": "every month", + "depends_on": { "incfreq": "Monthly" } + }, + { + "label": "every month", + "depends_on": { "incfreq": "Yearly" } + } ] }, "incfreq": { @@ -3464,9 +3463,7 @@ } }, "conditional_for": { - "chcharge": [ - "Yes" - ] + "chcharge": ["Yes"] } }, "chcharge": { @@ -3560,9 +3557,7 @@ } }, "conditional_for": { - "chcharge": [ - "Yes" - ] + "chcharge": ["Yes"] } }, "chcharge": { @@ -3606,9 +3601,7 @@ } }, "conditional_for": { - "chcharge": [ - "Yes" - ] + "chcharge": ["Yes"] } }, "chcharge": { @@ -3652,9 +3645,7 @@ } }, "conditional_for": { - "chcharge": [ - "Yes" - ] + "chcharge": ["Yes"] } }, "chcharge": { @@ -3694,12 +3685,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -3713,12 +3699,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -3732,12 +3713,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -3751,12 +3727,7 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -3772,12 +3743,7 @@ "suffix": " every week", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -3917,12 +3883,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -3936,12 +3897,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -3955,12 +3911,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -3974,12 +3925,7 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -3995,12 +3941,7 @@ "suffix": " every 2 weeks", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -4040,12 +3981,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -4059,12 +3995,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -4078,12 +4009,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -4097,12 +4023,7 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -4118,12 +4039,7 @@ "suffix": " every 4 weeks", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -4163,12 +4079,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -4182,12 +4093,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -4201,12 +4107,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -4220,12 +4121,7 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ], + "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -4241,12 +4137,7 @@ "suffix": " every month", "readonly": true, "requires_js": true, - "fields_added": [ - "brent", - "scharge", - "pscharge", - "supcharg" - ] + "fields_added": ["brent", "scharge", "pscharge", "supcharg"] } }, "depends_on": [ @@ -4366,4 +4257,4 @@ } } } -} \ No newline at end of file +} diff --git a/db/migrate/20220209105333_fix_typo.rb b/db/migrate/20220209105333_fix_typo.rb new file mode 100644 index 000000000..91ad9a847 --- /dev/null +++ b/db/migrate/20220209105333_fix_typo.rb @@ -0,0 +1,9 @@ +class FixTypo < ActiveRecord::Migration[7.0] + def up + rename_column :case_logs, :letting_in_sheltered_accomodation, :letting_in_sheltered_accommodation + end + + def down + rename_column :case_logs, :letting_in_sheltered_accommodation, :letting_in_sheltered_accomodation + end +end diff --git a/db/schema.rb b/db/schema.rb index bd49638f9..035cde2df 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -176,7 +176,7 @@ ActiveRecord::Schema[7.0].define(version: 202202071123100) do t.string "has_benefits" t.integer "nocharge" t.integer "is_carehome" - t.integer "letting_in_sheltered_accomodation" + t.integer "letting_in_sheltered_accommodation" t.integer "household_charge" t.integer "referral" t.decimal "brent", precision: 10, scale: 2 diff --git a/docs/api/DLUHC-CORE-Data.v1.json b/docs/api/DLUHC-CORE-Data.v1.json index 50ab9fce1..cb0b42641 100644 --- a/docs/api/DLUHC-CORE-Data.v1.json +++ b/docs/api/DLUHC-CORE-Data.v1.json @@ -754,10 +754,10 @@ "Couldn’t afford rent or mortgage - other", "To move nearer to family, friends or school", "To move nearer to work", - "To move to accomodation with support", - "To move to independent accomodation", + "To move to accommodation with support", + "To move to independent accommodation", "Hate crime", - "Death of household member in last settled accomodation", + "Death of household member in last settled accommodation", "Discharged from prison", "Discharged from long stay hospital or similar institution", "Other", diff --git a/spec/factories/case_log.rb b/spec/factories/case_log.rb index 0f0367f84..446ba286c 100644 --- a/spec/factories/case_log.rb +++ b/spec/factories/case_log.rb @@ -144,7 +144,7 @@ FactoryBot.define do has_benefits { "Yes" } is_carehome { "No" } chcharge { 7 } - letting_in_sheltered_accomodation { "No" } + letting_in_sheltered_accommodation { "No" } la_known { "Yes" } declaration { "Yes" } end diff --git a/spec/fixtures/complete_case_log.json b/spec/fixtures/complete_case_log.json index f98c80d70..690717769 100644 --- a/spec/fixtures/complete_case_log.json +++ b/spec/fixtures/complete_case_log.json @@ -143,7 +143,7 @@ "household_charge": "Yes", "is_carehome": "Yes", "chcharge": "6", - "letting_in_sheltered_accomodation": "No", + "letting_in_sheltered_accommodation": "No", "declaration": "Yes" } } diff --git a/spec/fixtures/forms/2021_2022.json b/spec/fixtures/forms/2021_2022.json index 9958ec25a..083ce0827 100644 --- a/spec/fixtures/forms/2021_2022.json +++ b/spec/fixtures/forms/2021_2022.json @@ -753,7 +753,7 @@ "property_postcode": { "questions": { "property_postcode": { - "check_answer_label": "Postcode of previous accomodation if the household has moved from settled accommodation", + "check_answer_label": "Postcode of previous accommodation if the household has moved from settled accommodation", "header": "Postcode for the previous accommodation", "hint_text": "If the household has moved from settled accommodation immediately prior to being re-housed", "type": "text", @@ -761,7 +761,7 @@ "conditional_for": { "fake_key": "fake_condition" } }, "previous_postcode": { - "check_answer_label": "Postcode of previous accomodation if the household has moved from settled accommodation", + "check_answer_label": "Postcode of previous accommodation if the household has moved from settled accommodation", "header": "Postcode for the previous accommodation", "hint_text": "If the household has moved from settled accommodation immediately prior to being re-housed", "type": "text", diff --git a/spec/models/case_log_spec.rb b/spec/models/case_log_spec.rb index e3f4d784b..c49168d4f 100644 --- a/spec/models/case_log_spec.rb +++ b/spec/models/case_log_spec.rb @@ -892,15 +892,15 @@ RSpec.describe CaseLog do }.to raise_error(ActiveRecord::RecordInvalid) end - it "cannot be temp accomodation if previous tenancy was non temp" do + it "cannot be temp accommodation if previous tenancy was non temp" do check_rsnvac_validation("Tied housing or rented with job") check_rsnvac_validation("Supported housing") - check_rsnvac_validation("Sheltered accomodation") + check_rsnvac_validation("Sheltered accommodation") check_rsnvac_validation("Home Office Asylum Support") check_rsnvac_validation("Other") end - it "cannot be temp accomodation if source of letting referral " do + it "cannot be temp accommodation if source of letting referral " do check_rsnvac_referral_validation("Re-located through official housing mobility scheme") check_rsnvac_referral_validation("Other social landlord") check_rsnvac_referral_validation("Police, probation or prison")