Browse Source

Fix sale date changing 2024 -> 2023 test

pull/2509/head
Rachael Booth 2 years ago
parent
commit
499e5ca6f7
  1. 6
      spec/requests/form_controller_spec.rb

6
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

Loading…
Cancel
Save