|
|
|
|
@ -42,8 +42,13 @@ 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({ |
|
|
|
|
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.", |
|
|
|
|
@ -65,7 +70,8 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
|
|
|
|
|
"3" => { |
|
|
|
|
"value" => "Other", |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
@ -74,8 +80,9 @@ 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({ |
|
|
|
|
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.", |
|
|
|
|
@ -101,7 +108,8 @@ RSpec.describe Form::Lettings::Questions::TenancyType, type: :model do
|
|
|
|
|
"3" => { |
|
|
|
|
"value" => "Other", |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|