Browse Source

Test routing

pull/563/head
baarkerlounger 3 years ago
parent
commit
fe2ab11e4a
  1. 6
      spec/models/form_spec.rb

6
spec/models/form_spec.rb

@ -191,12 +191,16 @@ RSpec.describe Form, type: :model do
end
end
context "when a page is marked as `derived`" do
context "when a page is marked as `derived` and `depends_on: false`" do
let(:case_log) { FactoryBot.build(:case_log, :in_progress, startdate: Time.utc(2023, 2, 2, 10, 36, 49)) }
it "does not count it's questions as invalidated" do
expect(form.enabled_page_questions(case_log).map(&:id).uniq).to include("tshortfall_known")
end
it "does not route to the page" do
expect(form.invalidated_pages(case_log).map(&:id)).to include("outstanding_amount_known")
end
end
end
end

Loading…
Cancel
Save