From 310d31a61cbbf5f3a7f4b9e76de87fca6f0522ed Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:36:37 +0100 Subject: [PATCH] CLDC-3483 Update logger statements (#2468) * Update logger statements * Update test --- lib/tasks/fix_nil_letting_allocation_values.rake | 2 +- spec/lib/tasks/fix_nil_letting_allocation_values_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/fix_nil_letting_allocation_values.rake b/lib/tasks/fix_nil_letting_allocation_values.rake index 770fc63d7..1136ed684 100644 --- a/lib/tasks/fix_nil_letting_allocation_values.rake +++ b/lib/tasks/fix_nil_letting_allocation_values.rake @@ -20,6 +20,6 @@ task fix_nil_letting_allocation_values: :environment do next if log.save - Rails.logger.log("NilLettingsAllocationValues: Unable to save changes to log #{log.id}") + Rails.logger.info("NilLettingsAllocationValues: Unable to save changes to log #{log.id}") end end diff --git a/spec/lib/tasks/fix_nil_letting_allocation_values_spec.rb b/spec/lib/tasks/fix_nil_letting_allocation_values_spec.rb index c8992a6e6..8db478eb8 100644 --- a/spec/lib/tasks/fix_nil_letting_allocation_values_spec.rb +++ b/spec/lib/tasks/fix_nil_letting_allocation_values_spec.rb @@ -66,7 +66,7 @@ RSpec.describe "fix_nil_letting_allocation_values" do it "logs the log id if the change cannot be saved" do log = create(:lettings_log, :ignore_validation_errors, :setup_completed, startdate: Time.zone.local(2022, 4, 1), cbl: 1, chr: nil, cap: nil, letting_allocation_unknown: nil) - expect(Rails.logger).to receive(:log).with(match(/log #{log.id}/)) + expect(Rails.logger).to receive(:info).with(match(/log #{log.id}/)) task.invoke end end