Browse Source

feat: update linking behaviour for jointpur

pull/938/head
natdeanlewissoftwire 3 years ago
parent
commit
f146256d7f
  1. 9
      app/models/form/sales/pages/joint_purchase.rb
  2. 12
      spec/models/form/sales/pages/joint_purchase_spec.rb

9
app/models/form/sales/pages/joint_purchase.rb

@ -5,6 +5,15 @@ class Form::Sales::Pages::JointPurchase < ::Form::Page
@header = ""
@description = ""
@subsection = subsection
@depends_on = [{
"ownershipsch" => 1,
},
{
"ownershipsch" => 2,
},
{
"companybuy" => 2,
}]
end
def questions

12
spec/models/form/sales/pages/joint_purchase_spec.rb

@ -26,4 +26,16 @@ RSpec.describe Form::Sales::Pages::JointPurchase, type: :model do
it "has the correct description" do
expect(page.description).to eq("")
end
it "has correct depends_on" do
expect(page.depends_on).to eq([{
"ownershipsch" => 1,
},
{
"ownershipsch" => 2,
},
{
"companybuy" => 2,
}])
end
end

Loading…
Cancel
Save