From 886f8ed7519150f0416a32d0b89084bc754ea913 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 28 Apr 2023 09:33:29 -0400 Subject: [PATCH] Bug 31212: (QA follow-up) Fix unit test, remove unused imports Signed-off-by: Kyle M Hall --- C4/Circulation.pm | 2 +- C4/Items.pm | 2 +- t/db_dependent/Koha/Items.t | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 05a7300260..a4f12bef87 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -42,7 +42,7 @@ use Koha::Account; use Koha::AuthorisedValues; use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue; use Koha::Biblioitems; -use Koha::DateUtils qw( dt_from_string output_pref ); +use Koha::DateUtils qw( dt_from_string ); use Koha::Calendar; use Koha::Checkouts; use Koha::Illrequests; diff --git a/C4/Items.pm b/C4/Items.pm index b1ac879876..ea008f09e2 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -56,7 +56,7 @@ use DateTime::Format::MySQL; # debugging; so please don't remove this use Koha::AuthorisedValues; -use Koha::DateUtils qw( dt_from_string output_pref ); +use Koha::DateUtils qw( dt_from_string ); use Koha::Database; use Koha::Biblios; diff --git a/t/db_dependent/Koha/Items.t b/t/db_dependent/Koha/Items.t index 0c424f98db..5676a56596 100755 --- a/t/db_dependent/Koha/Items.t +++ b/t/db_dependent/Koha/Items.t @@ -83,7 +83,7 @@ subtest 'store' => sub { is( t::lib::Dates::compare( $item->replacementpricedate, $today ), 0, 'replacementpricedate must have been set to today if not given' ); - is( t::lib::Dates::compare( $item->datelastseen, $today ), + is( t::lib::Dates::compare( dt_from_string($item->datelastseen)->ymd, $today ), 0, 'datelastseen must have been set to today if not given' ); is( $item->itype, -- 2.30.2