From 35b7ce7f92f78269e370c04ed175aa40365175a4 Mon Sep 17 00:00:00 2001 From: Ynda Jas Date: Tue, 25 Jun 2024 10:36:44 +0100 Subject: [PATCH] Update Rake task logging expectation a8b0f53 bumped `govuk_app_config` from 9.11.2 to 9.12.0, which set the `time_zone` to London in all GOV.UK apps. This appears to change how the timezone is reported when calling `updated_at` on a record: what was `UTC` is now `+0000`. This change resulted in a couple of failing tests, but only related to console logging within a Rake task, so we should be fine just to update our expectations here --- .../tasks/data_hygiene/content_item_deduplicator_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/lib/tasks/data_hygiene/content_item_deduplicator_spec.rb b/spec/lib/tasks/data_hygiene/content_item_deduplicator_spec.rb index c31718609..1aedf7e60 100644 --- a/spec/lib/tasks/data_hygiene/content_item_deduplicator_spec.rb +++ b/spec/lib/tasks/data_hygiene/content_item_deduplicator_spec.rb @@ -14,10 +14,10 @@ create(:content_item, content_id: content_item.content_id, locale: "en") expect(Rails.logger).to receive(:info).with("These duplicates were destroyed...") - expect(Rails.logger).to receive(:info).with("#{content_item.content_id},cy,2020-02-27 00:00:00 UTC,#{content_item.base_path}") + expect(Rails.logger).to receive(:info).with("#{content_item.content_id},cy,2020-02-27 00:00:00 +0000,#{content_item.base_path}") expect(Rails.logger).to receive(:info).twice.with("-----------------------------------------------------------------") expect(Rails.logger).to receive(:info).with("These records were preserved...") - expect(Rails.logger).to receive(:info).with("#{content_item.content_id},cy,2020-02-27 00:00:00 UTC,#{content_item2.base_path}") + expect(Rails.logger).to receive(:info).with("#{content_item.content_id},cy,2020-02-27 00:00:00 +0000,#{content_item2.base_path}") expect(Rails.logger).to receive(:info).with("2 duplicates found.") expect(Rails.logger).to receive(:info).with("1 records were removed.") expect(Rails.logger).to receive(:info).with("1 records were preserved.") @@ -33,10 +33,10 @@ create(:content_item, content_id: content_item.content_id, locale: "fr") expect(Rails.logger).to receive(:info).with("These duplicates would be destroyed...") - expect(Rails.logger).to receive(:info).with("#{content_item.content_id},en,2020-02-27 00:00:00 UTC,#{content_item.base_path}") + expect(Rails.logger).to receive(:info).with("#{content_item.content_id},en,2020-02-27 00:00:00 +0000,#{content_item.base_path}") expect(Rails.logger).to receive(:info).twice.with("-----------------------------------------------------------------") expect(Rails.logger).to receive(:info).with("These records would be preserved...") - expect(Rails.logger).to receive(:info).with("#{content_item.content_id},en,2020-02-27 00:00:00 UTC,#{content_item2.base_path}") + expect(Rails.logger).to receive(:info).with("#{content_item.content_id},en,2020-02-27 00:00:00 +0000,#{content_item2.base_path}") expect(Rails.logger).to receive(:info).with("2 duplicates found.") expect(Rails.logger).to receive(:info).with("1 records would be removed.") expect(Rails.logger).to receive(:info).with("1 records would be preserved.")