Browse Source

feat: fix tests

pull/1546/head
natdeanlewissoftwire 3 years ago
parent
commit
03a545b19d
  1. 16
      app/models/form/sales/pages/housing_benefits.rb

16
app/models/form/sales/pages/housing_benefits.rb

@ -2,14 +2,6 @@ class Form::Sales::Pages::HousingBenefits < ::Form::Page
def initialize(id, hsh, subsection, joint_purchase:)
super(id, hsh, subsection)
@joint_purchase = joint_purchase
@depends_on =
[
if @joint_purchase
{ "joint_purchase?" => true }
else
{ "not_joint_purchase?" => true }
end,
]
end
def questions
@ -17,4 +9,12 @@ class Form::Sales::Pages::HousingBenefits < ::Form::Page
Form::Sales::Questions::HousingBenefits.new(nil, nil, self, joint_purchase: @joint_purchase),
]
end
def depends_on
if @joint_purchase
[{ "joint_purchase?" => true }]
else
[{ "not_joint_purchase?" => true }]
end
end
end

Loading…
Cancel
Save