Browse Source

Only display local authority question if the la is not inferred

pull/1187/head
Kat 3 years ago
parent
commit
b86eeb60fb
  1. 3
      app/models/form/sales/pages/property_local_authority.rb
  2. 6
      spec/models/form/sales/pages/property_local_authority_spec.rb

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

@ -2,6 +2,9 @@ class Form::Sales::Pages::PropertyLocalAuthority < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "property_local_authority"
@depends_on = [{
"is_la_inferred" => false,
}]
end
def questions

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

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

Loading…
Cancel
Save