Browse Source

Make privacy notice mandatory (#1351)

pull/1352/head
kosiakkatrina 2 years ago committed by GitHub
parent
commit
21341bdac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/models/form/sales/pages/privacy_notice.rb
  2. 3
      spec/fixtures/imports/sales_logs/discounted_ownership_sales_log.xml
  3. 2
      spec/models/form/sales/pages/privacy_notice_spec.rb

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

@ -3,9 +3,6 @@ class Form::Sales::Pages::PrivacyNotice < ::Form::Page
super
@id = "privacy_notice"
@header = "Department for Levelling Up, Housing and Communities privacy notice"
@depends_on = [{
"noint" => 2,
}]
end
def questions

3
spec/fixtures/imports/sales_logs/discounted_ownership_sales_log.xml vendored

@ -14,8 +14,7 @@
<meta:rules assert-valid="true"/>
</meta:metadata>
<Group>
<!-- replace with commented options to test in the future -->
<!-- <Qdp>Yes</Qdp> -->
<Qdp>Yes</Qdp>
<Qdp/>
<CompletionDate>2023-02-01</CompletionDate>
<PurchaserCode>Discount ownership example</PurchaserCode>

2
spec/models/form/sales/pages/privacy_notice_spec.rb

@ -28,6 +28,6 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do
end
it "has correct depends_on" do
expect(page.depends_on).to eq([{ "noint" => 2 }])
expect(page.depends_on).to be_nil
end
end

Loading…
Cancel
Save