Browse Source

CLDC-1746 Show Handover question also on not on resale (#1183)

pull/1200/head^2
Jack 2 years ago committed by GitHub
parent
commit
826eaf22f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/models/form/sales/pages/handover_date.rb
  2. 4
      spec/models/form/sales/pages/handover_date_spec.rb

6
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

4
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

Loading…
Cancel
Save