From 0c06423d0e567db52681932a71dcdd1982e56e97 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 --- 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 707582d..98e94e7 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -2824,7 +2824,7 @@ $cache->clear_from_cache('single_holidays'); subtest 'AddRenewal and AddIssuingCharge tests' => sub { - plan tests => 12; + plan tests => 13; $schema->storage->txn_begin; @@ -2876,6 +2876,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.1.4