diff --git a/spec/models/form/lettings/questions/waityear_spec.rb b/spec/models/form/lettings/questions/waityear_spec.rb index 3ca65c6a7..51043f1f0 100644 --- a/spec/models/form/lettings/questions/waityear_spec.rb +++ b/spec/models/form/lettings/questions/waityear_spec.rb @@ -14,6 +14,8 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do allow(form).to receive(:start_year_2025_or_later?).and_return(false) allow(page).to receive(:subsection).and_return(subsection) allow(subsection).to receive(:form).and_return(form) + allow(form).to receive(:start_year_2025_or_later?).and_return(true) + allow(form).to receive(:start_year_2025_or_later?).and_return(true) end it "has correct page" do @@ -44,10 +46,6 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do expect(question.check_answers_card_number).to eq(0) end - before do - allow(form).to receive(:start_year_2025_or_later?).and_return(true) - end - it "has the correct answer_options" do expect(question.answer_options).to eq({ "13" => { "value" => "Household not on the housing register (or waiting list) in this area" }, diff --git a/spec/models/form_spec.rb b/spec/models/form_spec.rb index cbb0e1a89..f25c2b43d 100644 --- a/spec/models/form_spec.rb +++ b/spec/models/form_spec.rb @@ -71,8 +71,6 @@ RSpec.describe Form, type: :model do describe ".previous_page" do context "when the current page is not a value check page" do - let!(:subsection) { form.get_subsection("setup") } - it "returns the previous page if the page is routed to" do page = form.get_page("rent_type") expect(form.previous_page_id(page, lettings_log, user)).to eq("tenancy_start_date")