From f4f371281e2c70c72a1081e67dfb73e6a314604f Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 23 Feb 2024 10:56:15 +0000 Subject: [PATCH] Update rebase test --- .../form/sales/pages/managing_organisation_spec.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/spec/models/form/sales/pages/managing_organisation_spec.rb b/spec/models/form/sales/pages/managing_organisation_spec.rb index 10312900a..aacb7cccb 100644 --- a/spec/models/form/sales/pages/managing_organisation_spec.rb +++ b/spec/models/form/sales/pages/managing_organisation_spec.rb @@ -5,11 +5,8 @@ RSpec.describe Form::Sales::Pages::ManagingOrganisation, type: :model do let(:page_id) { nil } let(:page_definition) { nil } - let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1))) } - - before do - allow(form).to receive(:start_year_after_2024?).and_return(false) - end + let(:subsection) { instance_double(Form::Subsection, form:) } + let(:form) { instance_double(Form, start_date: Time.zone.local(2023, 4, 1), start_year_after_2024?: false) } it "has correct subsection" do expect(page.subsection).to eq(subsection) @@ -110,10 +107,7 @@ RSpec.describe Form::Sales::Pages::ManagingOrganisation, type: :model do describe "#routed_to? with 2024 logs" do let(:log) { create(:sales_log) } let(:organisation) { create(:organisation) } - - before do - allow(form).to receive(:start_year_after_2024?).and_return(true) - end + let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1), start_year_after_2024?: true) } context "when user nil" do it "is not shown" do