From 896af06bb88122da9dd4be7325c6007e54116fda Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Fri, 14 Apr 2023 17:17:16 +0100 Subject: [PATCH] feat: update test --- app/models/form/sales/pages/housing_benefits.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/form/sales/pages/housing_benefits.rb b/app/models/form/sales/pages/housing_benefits.rb index 670673bd8..f365422c9 100644 --- a/app/models/form/sales/pages/housing_benefits.rb +++ b/app/models/form/sales/pages/housing_benefits.rb @@ -2,7 +2,11 @@ class Form::Sales::Pages::HousingBenefits < ::Form::Page def initialize(id, hsh, subsection, joint_purchase:) super(id, hsh, subsection) @joint_purchase = joint_purchase - @depends_on = [{ "jointpur" => @joint_purchase ? 1 : 2 }] + @depends_on = [if @joint_purchase + { "joint_purchase?" => true } + else + { "not_joint_purchase?" => true } + end] end def questions