diff --git a/app/models/form/sales/pages/mortgage_amount.rb b/app/models/form/sales/pages/mortgage_amount.rb index 1c80b2f52..88f642042 100644 --- a/app/models/form/sales/pages/mortgage_amount.rb +++ b/app/models/form/sales/pages/mortgage_amount.rb @@ -4,6 +4,9 @@ class Form::Sales::Pages::MortgageAmount < ::Form::Page @header = "Mortgage Amount" @description = "" @subsection = subsection + @depends_on = [{ + "mortgageused" => 1, + }] end def questions diff --git a/spec/models/form/sales/pages/mortgage_amount_spec.rb b/spec/models/form/sales/pages/mortgage_amount_spec.rb index 28c37908b..4df02d1af 100644 --- a/spec/models/form/sales/pages/mortgage_amount_spec.rb +++ b/spec/models/form/sales/pages/mortgage_amount_spec.rb @@ -28,6 +28,8 @@ RSpec.describe Form::Sales::Pages::MortgageAmount, type: :model do end it "has correct depends_on" do - expect(page.depends_on).to be_nil + expect(page.depends_on).to eq([{ + "mortgageused" => 1, + }]) end end