Skip to content

Commit

Permalink
Update Rake task logging expectation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yndajas committed Jun 25, 2024
1 parent a8b0f53 commit 35b7ce7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/lib/tasks/data_hygiene/content_item_deduplicator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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.")
Expand Down

0 comments on commit 35b7ce7

Please sign in to comment.