|
|
|
@ -54,114 +54,42 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do |
|
|
|
|
|
|
|
|
|
|
|
it "has the correct answer_options" do |
|
|
|
it "has the correct answer_options" do |
|
|
|
expect(question.answer_options).to eq({ |
|
|
|
expect(question.answer_options).to eq({ |
|
|
|
"40" => { |
|
|
|
"40" => { "value" => "End of assured shorthold tenancy (no fault)" }, |
|
|
|
"value" => "End of assured shorthold tenancy (no fault)", |
|
|
|
"41" => { "value" => "End of assured shorthold tenancy (eviction or tenant at fault)" }, |
|
|
|
}, |
|
|
|
"42" => { "value" => "End of fixed term tenancy (no fault)" }, |
|
|
|
"41" => { |
|
|
|
"43" => { "value" => "End of fixed term tenancy (eviction or tenant at fault)" }, |
|
|
|
"value" => "End of assured shorthold tenancy (eviction or tenant at fault)", |
|
|
|
"1" => { "value" => "Permanently decanted from another property owned by this landlord" }, |
|
|
|
}, |
|
|
|
"46" => { "value" => "Discharged from long-stay hospital or similar institution" }, |
|
|
|
"42" => { |
|
|
|
"45" => { "value" => "Discharged from prison" }, |
|
|
|
"value" => "End of fixed term tenancy (no fault)", |
|
|
|
"2" => { "value" => "Left home country as a refugee" }, |
|
|
|
}, |
|
|
|
"4" => { "value" => "Loss of tied accommodation" }, |
|
|
|
"43" => { |
|
|
|
"9" => { "value" => "Asked to leave by family or friends" }, |
|
|
|
"value" => "End of fixed term tenancy (eviction or tenant at fault)", |
|
|
|
"44" => { "value" => "Death of household member in last settled accommodation" }, |
|
|
|
}, |
|
|
|
"8" => { "value" => "Relationship breakdown (non-violent) with partner" }, |
|
|
|
"1" => { |
|
|
|
"16" => { "value" => "To move nearer to family, friends or school" }, |
|
|
|
"value" => "Permanently decanted from another property owned by this landlord", |
|
|
|
"17" => { "value" => "To move nearer to work" }, |
|
|
|
}, |
|
|
|
"48" => { "value" => "Domestic abuse - previously joint tenancy with partner" }, |
|
|
|
"46" => { |
|
|
|
"49" => { "value" => "Domestic abuse - other" }, |
|
|
|
"value" => "Discharged from long-stay hospital or similar institution", |
|
|
|
"31" => { "value" => "Hate crime" }, |
|
|
|
}, |
|
|
|
"10" => { "value" => "Racial harassment" }, |
|
|
|
"45" => { |
|
|
|
"11" => { "value" => "Other problems with neighbours" }, |
|
|
|
"value" => "Discharged from prison", |
|
|
|
"35" => { "value" => "Couldn’t afford fees attached to renewing the tenancy" }, |
|
|
|
}, |
|
|
|
"36" => { "value" => "Couldn’t afford increase in rent" }, |
|
|
|
"2" => { |
|
|
|
"38" => { "value" => "Couldn’t afford rent or mortgage (employment)" }, |
|
|
|
"value" => "Left home country as a refugee", |
|
|
|
"37" => { "value" => "Couldn’t afford rent or mortgage (welfare reforms)" }, |
|
|
|
}, |
|
|
|
"39" => { "value" => "Couldn’t afford rent or mortgage (other)" }, |
|
|
|
"4" => { |
|
|
|
"34" => { "value" => "Repossession" }, |
|
|
|
"value" => "Loss of tied accommodation", |
|
|
|
"12" => { "value" => "Property unsuitable because of overcrowding" }, |
|
|
|
}, |
|
|
|
"13" => { "value" => "Property unsuitable because of ill health or disability" }, |
|
|
|
"9" => { |
|
|
|
"14" => { "value" => "Property unsuitable because of poor condition" }, |
|
|
|
"value" => "Asked to leave by family or friends", |
|
|
|
"18" => { "value" => "To move to accommodation with support" }, |
|
|
|
}, |
|
|
|
"19" => { "value" => "To move to independent accommodation" }, |
|
|
|
"44" => { |
|
|
|
"30" => { "value" => "Under occupation (no incentive)" }, |
|
|
|
"value" => "Death of household member in last settled accommodation", |
|
|
|
"29" => { "value" => "Under occupation (offered incentive to downsize)" }, |
|
|
|
}, |
|
|
|
"20" => { "value" => "Other" }, |
|
|
|
"8" => { |
|
|
|
"47" => { "value" => "Tenant prefers not to say" }, |
|
|
|
"value" => "Relationship breakdown (non-violent) with partner", |
|
|
|
"divider" => { "value" => true }, |
|
|
|
}, |
|
|
|
"28" => { "value" => "Don’t know" }, |
|
|
|
"16" => { |
|
|
|
|
|
|
|
"value" => "To move nearer to family, friends or school", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"17" => { |
|
|
|
|
|
|
|
"value" => "To move nearer to work", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"48" => { |
|
|
|
|
|
|
|
"value" => "Domestic abuse - previously joint tenancy with partner", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"49" => { |
|
|
|
|
|
|
|
"value" => "Domestic abuse - other", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"31" => { |
|
|
|
|
|
|
|
"value" => "Hate crime", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"10" => { |
|
|
|
|
|
|
|
"value" => "Racial harassment", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"11" => { |
|
|
|
|
|
|
|
"value" => "Other problems with neighbours", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"35" => { |
|
|
|
|
|
|
|
"value" => "Couldn’t afford fees attached to renewing the tenancy", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"36" => { |
|
|
|
|
|
|
|
"value" => "Couldn’t afford increase in rent", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"38" => { |
|
|
|
|
|
|
|
"value" => "Couldn’t afford rent or mortgage (employment)", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"37" => { |
|
|
|
|
|
|
|
"value" => "Couldn’t afford rent or mortgage (welfare reforms)", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"39" => { |
|
|
|
|
|
|
|
"value" => "Couldn’t afford rent or mortgage (other)", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"34" => { |
|
|
|
|
|
|
|
"value" => "Repossession", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"12" => { |
|
|
|
|
|
|
|
"value" => "Property unsuitable because of overcrowding", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"13" => { |
|
|
|
|
|
|
|
"value" => "Property unsuitable because of ill health or disability", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"14" => { |
|
|
|
|
|
|
|
"value" => "Property unsuitable because of poor condition", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"18" => { |
|
|
|
|
|
|
|
"value" => "To move to accommodation with support", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"19" => { |
|
|
|
|
|
|
|
"value" => "To move to independent accommodation", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"30" => { |
|
|
|
|
|
|
|
"value" => "Under occupation (no incentive)", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"29" => { |
|
|
|
|
|
|
|
"value" => "Under occupation (offered incentive to downsize)", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"20" => { |
|
|
|
|
|
|
|
"value" => "Other", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"47" => { |
|
|
|
|
|
|
|
"value" => "Tenant prefers not to say", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"divider" => { |
|
|
|
|
|
|
|
"value" => true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"28" => { |
|
|
|
|
|
|
|
"value" => "Don’t know", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
@ -177,102 +105,38 @@ RSpec.describe Form::Lettings::Questions::Reason, type: :model do |
|
|
|
|
|
|
|
|
|
|
|
it "has the correct answer_options" do |
|
|
|
it "has the correct answer_options" do |
|
|
|
expect(question.answer_options).to eq({ |
|
|
|
expect(question.answer_options).to eq({ |
|
|
|
"50" => { |
|
|
|
"50" => { "value" => "End of social housing tenancy - no fault" }, |
|
|
|
"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" }, |
|
|
|
"51" => { |
|
|
|
"53" => { "value" => "End of social housing tenancy - evicted for any other reason" }, |
|
|
|
"value" => "End of social housing tenancy - evicted due to anti-social behaviour (ASB)", |
|
|
|
"1" => { "value" => "Permanently decanted from another property owned by this landlord" }, |
|
|
|
}, |
|
|
|
"2" => { "value" => "Left home country as a refugee" }, |
|
|
|
"52" => { |
|
|
|
"45" => { "value" => "Discharged from prison" }, |
|
|
|
"value" => "End of social housing tenancy - evicted due to rent arrears", |
|
|
|
"46" => { "value" => "Discharged from long-stay hospital or similar institution" }, |
|
|
|
}, |
|
|
|
"4" => { "value" => "Loss of tied accommodation" }, |
|
|
|
"53" => { |
|
|
|
"9" => { "value" => "Asked to leave by family or friends" }, |
|
|
|
"value" => "End of social housing tenancy - evicted for any other reason", |
|
|
|
"8" => { "value" => "Relationship breakdown (non-violent) with partner" }, |
|
|
|
}, |
|
|
|
"44" => { "value" => "Death of household member in last settled accommodation" }, |
|
|
|
"1" => { |
|
|
|
"16" => { "value" => "To move nearer to family, friends or school" }, |
|
|
|
"value" => "Permanently decanted from another property owned by this landlord", |
|
|
|
"17" => { "value" => "To move nearer to work" }, |
|
|
|
}, |
|
|
|
"48" => { "value" => "Domestic abuse - previously joint tenancy with partner" }, |
|
|
|
"2" => { |
|
|
|
"49" => { "value" => "Domestic abuse - other" }, |
|
|
|
"value" => "Left home country as a refugee", |
|
|
|
"10" => { "value" => "Racial harassment" }, |
|
|
|
}, |
|
|
|
"31" => { "value" => "Hate crime" }, |
|
|
|
"45" => { |
|
|
|
"11" => { "value" => "Other problems with neighbours" }, |
|
|
|
"value" => "Discharged from prison", |
|
|
|
"34" => { "value" => "Repossession" }, |
|
|
|
}, |
|
|
|
"54" => { "value" => "Could no longer afford rent or mortgage" }, |
|
|
|
"46" => { |
|
|
|
"12" => { "value" => "Property unsuitable because of overcrowding" }, |
|
|
|
"value" => "Discharged from long-stay hospital or similar institution", |
|
|
|
"13" => { "value" => "Property unsuitable because of ill health or disability" }, |
|
|
|
}, |
|
|
|
"14" => { "value" => "Property unsuitable because of poor condition" }, |
|
|
|
"4" => { |
|
|
|
"29" => { "value" => "Under occupation (offered incentive to downsize)" }, |
|
|
|
"value" => "Loss of tied accommodation", |
|
|
|
"30" => { "value" => "Under occupation (no incentive)" }, |
|
|
|
}, |
|
|
|
"18" => { "value" => "To move to accommodation with support" }, |
|
|
|
"9" => { |
|
|
|
"19" => { "value" => "To move to independent accommodation" }, |
|
|
|
"value" => "Asked to leave by family or friends", |
|
|
|
"20" => { "value" => "Other" }, |
|
|
|
}, |
|
|
|
"28" => { "value" => "Don’t know" }, |
|
|
|
"8" => { |
|
|
|
"divider" => { "value" => true }, |
|
|
|
"value" => "Relationship breakdown (non-violent) with partner", |
|
|
|
"47" => { "value" => "Tenant prefers not to say" }, |
|
|
|
}, |
|
|
|
|
|
|
|
"44" => { |
|
|
|
|
|
|
|
"value" => "Death of household member in last settled accommodation", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"16" => { |
|
|
|
|
|
|
|
"value" => "To move nearer to family, friends or school", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"17" => { |
|
|
|
|
|
|
|
"value" => "To move nearer to work", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"48" => { |
|
|
|
|
|
|
|
"value" => "Domestic abuse - previously joint tenancy with partner", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"49" => { |
|
|
|
|
|
|
|
"value" => "Domestic abuse - other", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"10" => { |
|
|
|
|
|
|
|
"value" => "Racial harassment", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"31" => { |
|
|
|
|
|
|
|
"value" => "Hate crime", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"11" => { |
|
|
|
|
|
|
|
"value" => "Other problems with neighbours", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"34" => { |
|
|
|
|
|
|
|
"value" => "Repossession", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"54" => { |
|
|
|
|
|
|
|
"value" => "Could no longer afford rent or mortgage", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"12" => { |
|
|
|
|
|
|
|
"value" => "Property unsuitable because of overcrowding", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"13" => { |
|
|
|
|
|
|
|
"value" => "Property unsuitable because of ill health or disability", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"14" => { |
|
|
|
|
|
|
|
"value" => "Property unsuitable because of poor condition", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"29" => { |
|
|
|
|
|
|
|
"value" => "Under occupation (offered incentive to downsize)", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"30" => { |
|
|
|
|
|
|
|
"value" => "Under occupation (no incentive)", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"18" => { |
|
|
|
|
|
|
|
"value" => "To move to accommodation with support", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"19" => { |
|
|
|
|
|
|
|
"value" => "To move to independent accommodation", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"20" => { |
|
|
|
|
|
|
|
"value" => "Other", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"28" => { |
|
|
|
|
|
|
|
"value" => "Don’t know", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"divider" => { |
|
|
|
|
|
|
|
"value" => true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"47" => { |
|
|
|
|
|
|
|
"value" => "Tenant prefers not to say", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|