From 1ef98d3cf908b294d1f15fe342367e6bc3feef5e Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 30 Jun 2023 09:15:36 +0100 Subject: [PATCH] tests --- spec/requests/lettings_logs_controller_spec.rb | 4 ++-- spec/requests/sales_logs_controller_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb index 1f02d019b..2fc1ef461 100644 --- a/spec/requests/lettings_logs_controller_spec.rb +++ b/spec/requests/lettings_logs_controller_spec.rb @@ -943,7 +943,7 @@ RSpec.describe LettingsLogsController, type: :request do completed_lettings_log.reload get "/lettings-logs/#{completed_lettings_log.id}", headers:, params: {} - expect(completed_lettings_log.form.new_logs_end_date).to eq(Time.zone.local(2023, 12, 31)) + expect(completed_lettings_log.form.new_logs_end_date).to eq(Time.zone.local(2022, 12, 31)) expect(completed_lettings_log.status).to eq("completed") expect(page).to have_link("review and make changes to this log", href: "/lettings-logs/#{completed_lettings_log.id}/review") end @@ -981,7 +981,7 @@ RSpec.describe LettingsLogsController, type: :request do it "displays a closed collection window message for previous collection year logs" do get "/lettings-logs/#{completed_lettings_log.id}", headers:, params: {} - expect(completed_lettings_log.form.new_logs_end_date).to eq(Time.zone.local(2022, 7, 1)) + expect(completed_lettings_log.form.new_logs_end_date).to eq(Time.zone.local(2022, 12, 31)) expect(completed_lettings_log.status).to eq("completed") follow_redirect! expect(page).to have_content("This log is from the 2021/2022 collection window, which is now closed.") diff --git a/spec/requests/sales_logs_controller_spec.rb b/spec/requests/sales_logs_controller_spec.rb index d2a1d5e5b..5d24e6b01 100644 --- a/spec/requests/sales_logs_controller_spec.rb +++ b/spec/requests/sales_logs_controller_spec.rb @@ -588,7 +588,7 @@ RSpec.describe SalesLogsController, type: :request do completed_sales_log.reload get "/sales-logs/#{completed_sales_log.id}", headers:, params: {} - expect(completed_sales_log.form.new_logs_end_date).to eq(Time.zone.local(2022, 8, 7)) + expect(completed_sales_log.form.new_logs_end_date).to eq(Time.zone.local(2022, 12, 31)) expect(completed_sales_log.status).to eq("completed") expect(page).to have_link("review and make changes to this log", href: "/sales-logs/#{completed_sales_log.id}/review?sales_log=true") end @@ -626,7 +626,7 @@ RSpec.describe SalesLogsController, type: :request do it "displays a closed collection window message for previous collection year logs" do get "/sales-logs/#{completed_sales_log.id}", headers:, params: {} - expect(completed_sales_log.form.new_logs_end_date).to eq(Time.zone.local(2022, 8, 7)) + expect(completed_sales_log.form.new_logs_end_date).to eq(Time.zone.local(2022, 12, 31)) expect(completed_sales_log.status).to eq("completed") follow_redirect! expect(page).to have_content("This log is from the 2021/2022 collection window, which is now closed.")