Browse Source

fix: dependency behaviour

CLDC-1482-sales-log-buyer-company
natdeanlewissoftwire 2 years ago
parent
commit
14e320f58a
  1. 3
      app/models/form/sales/pages/buyer_company.rb
  2. 6
      spec/models/form/sales/pages/buyer_company_spec.rb

3
app/models/form/sales/pages/buyer_company.rb

@ -5,6 +5,9 @@ class Form::Sales::Pages::BuyerCompany < ::Form::Page
@header = "" @header = ""
@description = "" @description = ""
@subsection = subsection @subsection = subsection
@depends_on = [{
"ownershipsch" => 3,
}]
end end
def questions def questions

6
spec/models/form/sales/pages/buyer_company_spec.rb

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

Loading…
Cancel
Save