@ -6,7 +6,7 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question
@header="What is the type of shared ownership sale?"
@header="What is the type of shared ownership sale?"
@hint_text="A shared ownership sale is when the purchaser buys up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion"
@hint_text="A shared ownership sale is when the purchaser buys up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion"
@ -35,6 +38,7 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do
expect(question.hint_text).toeq("A shared ownership sale is when the purchaser buys up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion")
expect(question.hint_text).toeq("A shared ownership sale is when the purchaser buys up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion")
end
end
context"when form start date is 2022"do
it"has the correct answer_options"do
it"has the correct answer_options"do
expect(question.answer_options).toeq({
expect(question.answer_options).toeq({
"2"=>{"value"=>"Shared Ownership"},
"2"=>{"value"=>"Shared Ownership"},
@ -46,4 +50,22 @@ RSpec.describe Form::Sales::Questions::SharedOwnershipType, type: :model do
"30"=>{"value"=>"Shared Ownership - 2021 model lease"},
"30"=>{"value"=>"Shared Ownership - 2021 model lease"},
})
})
end
end
end
context"when form start date is 2023"do
let(:start_date){Time.utc(2023,4,2)}
it"has the correct answer_options"do
expect(question.answer_options).toeq({
"2"=>{"value"=>"Shared Ownership (old model lease)"},
"30"=>{"value"=>"Shared Ownership (new model lease)"},