From 826eaf22f11d718aca5df9dad659651099d27f26 Mon Sep 17 00:00:00 2001 From: Jack <113976590+bibblobcode@users.noreply.github.com> Date: Thu, 19 Jan 2023 09:24:09 +0000 Subject: [PATCH] CLDC-1746 Show Handover question also on not on resale (#1183) --- app/models/form/sales/pages/handover_date.rb | 6 +++--- spec/models/form/sales/pages/handover_date_spec.rb | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/models/form/sales/pages/handover_date.rb b/app/models/form/sales/pages/handover_date.rb index eeeb48333..35fbe7822 100644 --- a/app/models/form/sales/pages/handover_date.rb +++ b/app/models/form/sales/pages/handover_date.rb @@ -2,9 +2,9 @@ class Form::Sales::Pages::HandoverDate < ::Form::Page def initialize(id, hsh, subsection) super @id = "handover_date" - @depends_on = [{ - "ownershipsch" => 1, - }] + @depends_on = [ + { "ownershipsch" => 1, "resale" => 2 }, + ] end def questions diff --git a/spec/models/form/sales/pages/handover_date_spec.rb b/spec/models/form/sales/pages/handover_date_spec.rb index fa2156cf7..1699dbf9e 100644 --- a/spec/models/form/sales/pages/handover_date_spec.rb +++ b/spec/models/form/sales/pages/handover_date_spec.rb @@ -28,8 +28,6 @@ RSpec.describe Form::Sales::Pages::HandoverDate, type: :model do end it "has the correct depends_on" do - expect(page.depends_on).to eq([{ - "ownershipsch" => 1, - }]) + expect(page.depends_on).to eq([{ "ownershipsch" => 1, "resale" => 2 }]) end end