Browse Source

Update setup tests

pull/2751/head
Manny Dinssa 1 year ago
parent
commit
f8f55e1f64
  1. 34
      spec/models/form/sales/subsections/setup_spec.rb

34
spec/models/form/sales/subsections/setup_spec.rb

@ -47,7 +47,7 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
end
end
context "when start year is >= 2024" do
context "when start year is 2024" do
before do
allow(section.form).to receive(:start_year_2024_or_later?).and_return(true)
allow(section.form).to receive(:start_year_2025_or_later?).and_return(false)
@ -77,4 +77,36 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
)
end
end
context "when start year is >= 2025" do
before do
allow(section.form).to receive(:start_year_2024_or_later?).and_return(true)
allow(section.form).to receive(:start_year_2025_or_later?).and_return(true)
end
it "has correct pages" do
expect(setup.pages.map(&:id)).to eq(
%w[
owning_organisation
managing_organisation
assigned_to
completion_date
purchaser_code
ownership_scheme
staircasing
shared_ownership_type
discounted_ownership_type
outright_ownership_type
buyer_company
buyer_live
joint_purchase
number_joint_buyers
buyer_interview_joint_purchase
buyer_interview
privacy_notice_joint_purchase
privacy_notice
],
)
end
end
end

Loading…
Cancel
Save