Browse Source

It's always joint purchase if age 2 is displayed

pull/1191/head
Kat 3 years ago
parent
commit
bdb3c51d92
  1. 3
      app/models/form/sales/subsections/household_characteristics.rb
  2. 3
      spec/models/form/sales/subsections/household_characteristics_spec.rb
  3. 4
      spec/models/form_handler_spec.rb

3
app/models/form/sales/subsections/household_characteristics.rb

@ -30,13 +30,10 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection
Form::Sales::Pages::Buyer1LiveInProperty.new(nil, nil, self),
Form::Sales::Pages::Buyer2RelationshipToBuyer1.new(nil, nil, self),
Form::Sales::Pages::Age2.new(nil, nil, self),
Form::Sales::Pages::RetirementValueCheck.new("age_2_retirement_value_check", nil, self, person_index: 2),
Form::Sales::Pages::RetirementValueCheck.new("age_2_retirement_value_check_joint_purchase", nil, self, person_index: 2),
Form::Sales::Pages::GenderIdentity2.new(nil, nil, self),
Form::Sales::Pages::RetirementValueCheck.new("gender_2_retirement_value_check", nil, self, person_index: 2),
Form::Sales::Pages::RetirementValueCheck.new("gender_2_retirement_value_check_joint_purchase", nil, self, person_index: 2),
Form::Sales::Pages::Buyer2WorkingSituation.new(nil, nil, self),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_2_retirement_value_check", nil, self, person_index: 2),
Form::Sales::Pages::RetirementValueCheck.new("working_situation_2_retirement_value_check_joint_purchase", nil, self, person_index: 2),
Form::Sales::Pages::Buyer2LiveInProperty.new(nil, nil, self),
Form::Sales::Pages::NumberOfOthersInProperty.new(nil, nil, self),

3
spec/models/form/sales/subsections/household_characteristics_spec.rb

@ -36,13 +36,10 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
buyer_1_live_in_property
buyer_2_relationship_to_buyer_1
buyer_2_age
age_2_retirement_value_check
age_2_retirement_value_check_joint_purchase
buyer_2_gender_identity
gender_2_retirement_value_check
gender_2_retirement_value_check_joint_purchase
buyer_2_working_situation
working_situation_2_retirement_value_check
working_situation_2_retirement_value_check_joint_purchase
buyer_2_live_in_property
number_of_others_in_property

4
spec/models/form_handler_spec.rb

@ -52,14 +52,14 @@ RSpec.describe FormHandler do
it "is able to load a current sales form" do
form = form_handler.get_form("current_sales")
expect(form).to be_a(Form)
expect(form.pages.count).to eq(185)
expect(form.pages.count).to eq(182)
expect(form.name).to eq("2022_2023_sales")
end
it "is able to load a previous sales form" do
form = form_handler.get_form("previous_sales")
expect(form).to be_a(Form)
expect(form.pages.count).to eq(185)
expect(form.pages.count).to eq(182)
expect(form.name).to eq("2021_2022_sales")
end
end

Loading…
Cancel
Save