|
|
|
|
@ -42,30 +42,36 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "with 2023/24 form" do |
|
|
|
|
it "has the correct answer_options" do |
|
|
|
|
expect(question.answer_options).to eq({ |
|
|
|
|
"4" => { |
|
|
|
|
"value" => "Assured Shorthold Tenancy (AST) – Fixed term", |
|
|
|
|
"hint" => "Mostly housing associations provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", |
|
|
|
|
}, |
|
|
|
|
"6" => { |
|
|
|
|
"value" => "Secure – fixed term", |
|
|
|
|
"hint" => "Mostly local authorities provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", |
|
|
|
|
}, |
|
|
|
|
"2" => { |
|
|
|
|
"value" => "Assured – lifetime", |
|
|
|
|
}, |
|
|
|
|
"7" => { |
|
|
|
|
"value" => "Secure – lifetime", |
|
|
|
|
}, |
|
|
|
|
"5" => { |
|
|
|
|
"value" => "Licence agreement", |
|
|
|
|
"hint" => "Licence agreements are mostly used for Supported Housing and work on a rolling basis.", |
|
|
|
|
}, |
|
|
|
|
"3" => { |
|
|
|
|
"value" => "Other", |
|
|
|
|
before do |
|
|
|
|
allow(form).to receive(:start_year_after_2024?).and_return(false) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "has the correct answer options" do |
|
|
|
|
expect(question.answer_options).to eq( |
|
|
|
|
{ |
|
|
|
|
"4" => { |
|
|
|
|
"value" => "Assured Shorthold Tenancy (AST) – Fixed term", |
|
|
|
|
"hint" => "Mostly housing associations provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", |
|
|
|
|
}, |
|
|
|
|
"6" => { |
|
|
|
|
"value" => "Secure – fixed term", |
|
|
|
|
"hint" => "Mostly local authorities provide these. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", |
|
|
|
|
}, |
|
|
|
|
"2" => { |
|
|
|
|
"value" => "Assured – lifetime", |
|
|
|
|
}, |
|
|
|
|
"7" => { |
|
|
|
|
"value" => "Secure – lifetime", |
|
|
|
|
}, |
|
|
|
|
"5" => { |
|
|
|
|
"value" => "Licence agreement", |
|
|
|
|
"hint" => "Licence agreements are mostly used for Supported Housing and work on a rolling basis.", |
|
|
|
|
}, |
|
|
|
|
"3" => { |
|
|
|
|
"value" => "Other", |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
@ -74,34 +80,36 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
|
|
|
|
|
allow(form).to receive(:start_year_after_2024?).and_return(true) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "has the correct answer_options" do |
|
|
|
|
expect(question.answer_options).to eq({ |
|
|
|
|
"4" => { |
|
|
|
|
"value" => "Assured Shorthold Tenancy (AST) – Fixed term", |
|
|
|
|
"hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", |
|
|
|
|
}, |
|
|
|
|
"6" => { |
|
|
|
|
"value" => "Secure – fixed term", |
|
|
|
|
"hint" => "These are mostly provided by local authorities. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", |
|
|
|
|
}, |
|
|
|
|
"2" => { |
|
|
|
|
"value" => "Assured – lifetime", |
|
|
|
|
}, |
|
|
|
|
"7" => { |
|
|
|
|
"value" => "Secure – lifetime", |
|
|
|
|
}, |
|
|
|
|
"8" => { |
|
|
|
|
"value" => "Periodic", |
|
|
|
|
"hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.", |
|
|
|
|
}, |
|
|
|
|
"5" => { |
|
|
|
|
"value" => "Licence agreement", |
|
|
|
|
"hint" => "These are mostly used for Supported Housing and work on a rolling basis.", |
|
|
|
|
}, |
|
|
|
|
"3" => { |
|
|
|
|
"value" => "Other", |
|
|
|
|
it "has the correct answer options" do |
|
|
|
|
expect(question.answer_options).to eq( |
|
|
|
|
{ |
|
|
|
|
"4" => { |
|
|
|
|
"value" => "Assured Shorthold Tenancy (AST) – Fixed term", |
|
|
|
|
"hint" => "These are mostly provided by housing associations. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", |
|
|
|
|
}, |
|
|
|
|
"6" => { |
|
|
|
|
"value" => "Secure – fixed term", |
|
|
|
|
"hint" => "These are mostly provided by local authorities. Fixed term tenancies are intended to be for a set amount of time up to 20 years.", |
|
|
|
|
}, |
|
|
|
|
"2" => { |
|
|
|
|
"value" => "Assured – lifetime", |
|
|
|
|
}, |
|
|
|
|
"7" => { |
|
|
|
|
"value" => "Secure – lifetime", |
|
|
|
|
}, |
|
|
|
|
"8" => { |
|
|
|
|
"value" => "Periodic", |
|
|
|
|
"hint" => "These are rolling tenancies with no fixed end date. They may have an initial fixed term and then become rolling.", |
|
|
|
|
}, |
|
|
|
|
"5" => { |
|
|
|
|
"value" => "Licence agreement", |
|
|
|
|
"hint" => "These are mostly used for Supported Housing and work on a rolling basis.", |
|
|
|
|
}, |
|
|
|
|
"3" => { |
|
|
|
|
"value" => "Other", |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|