Bug 22917: Fix a typo in an output_pref call
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 16 May 2019 15:55:16 +0000 (16:55 +0100)
committerroot <root@3a587d3cf21c>
Thu, 23 May 2019 14:47:41 +0000 (14:47 +0000)
Due to a type in a call to output_pref (datenonly vs dateonly) we were
comparing logactions within a minutes accuracy. Counting the logs for
the day would be sufficient for the test ;)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

t/db_dependent/Circulation.t

index 37ab7a5..54b3c78 100755 (executable)
@@ -3000,7 +3000,7 @@ subtest 'AddRenewal and AddIssuingCharge tests' => sub {
     # Check the item out
     AddIssue( $patron->unblessed, $item->barcode );
     t::lib::Mocks::mock_preference( 'RenewalLog', 0 );
-    my $date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } );
+    my $date = output_pref( { dt => dt_from_string(), dateonly => 1, dateformat => 'iso' } );
     my %params_renewal = (
         timestamp => { -like => $date . "%" },
         module => "CIRCULATION",
@@ -3016,7 +3016,7 @@ subtest 'AddRenewal and AddIssuingCharge tests' => sub {
     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' } );
+    $date = output_pref( { dt => dt_from_string(), dateonly => 1, dateformat => 'iso' } );
     $old_log_size = Koha::ActionLogs->count( \%params_renewal );
     AddRenewal( $patron->id, $item->id, $library->id );
     $new_log_size = Koha::ActionLogs->count( \%params_renewal );