From fe9a4b624fe2cc1cd6e351b027ef3c9187bf18b4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 22 Feb 2019 11:01:38 -0300 Subject: [PATCH] Bug 18957: Add tests Signed-off-by: Owen Leonard Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens (cherry picked from commit 54fd0718da1bd27531c7f3ac4ea16d04fb15e634) Signed-off-by: Martin Renvoize --- t/db_dependent/Circulation.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 4e3fd23092..1e296ecdad 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -2773,7 +2773,7 @@ $cache->clear_from_cache('single_holidays'); subtest 'AddRenewal and AddIssuingCharge tests' => sub { - plan tests => 9; + plan tests => 10; $schema->storage->txn_begin; @@ -2825,6 +2825,10 @@ subtest 'AddRenewal and AddIssuingCharge tests' => sub { my $new_log_size = scalar( @{ GetLogs( $date, $date, undef, ["CIRCULATION"], ["RENEWAL"] ) } ); is( $new_log_size, $old_log_size, 'renew log not added because of the syspref RenewalLog' ); + my $checkouts = $patron->checkouts; + # The following will fail if run on 00:00:00 + unlike ( $checkouts->next->lastreneweddate, qr/00:00:00/, 'AddRenewal should set the renewal date with the time part'); + t::lib::Mocks::mock_preference( 'RenewalLog', 1 ); $date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } ); $old_log_size = scalar( @{ GetLogs( $date, $date, undef, ["CIRCULATION"], ["RENEWAL"] ) } ); -- 2.39.5