From 499e5ca6f7af4c3d76fa2294f09465db7f90c8af Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Thu, 18 Jul 2024 12:26:19 +0100 Subject: [PATCH] Fix sale date changing 2024 -> 2023 test --- spec/requests/form_controller_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/requests/form_controller_spec.rb b/spec/requests/form_controller_spec.rb index e666f5bec..020dba3a4 100644 --- a/spec/requests/form_controller_spec.rb +++ b/spec/requests/form_controller_spec.rb @@ -1016,7 +1016,7 @@ RSpec.describe FormController, type: :request do end end - xcontext "when the sale date changes from 2024 to 2023" do # TODO: CLDC-3505 remove this test on year hard end + context "when the sale date changes from 2024 to 2023" do let(:sales_log) { create(:sales_log, owning_organisation: organisation, managing_organisation:, assigned_to: user) } let(:params) do { @@ -1034,10 +1034,10 @@ RSpec.describe FormController, type: :request do before do organisation.managing_agents << managing_organisation organisation.reload - sales_log.saledate = Time.zone.local(2024, 12, 1) + sales_log.saledate = Time.zone.local(2024, 5, 1) sales_log.save!(validate: false) sales_log.reload - Timecop.freeze(Time.zone.local(2024, 12, 1)) + Timecop.freeze(Time.zone.local(2024, 5, 1)) Singleton.__init__(FormHandler) end