Bug 25729: Prevent Charges/Fees.t to fail on slow server
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 27 Jul 2020 13:15:44 +0000 (15:15 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 27 Jul 2020 15:03:51 +0000 (17:03 +0200)
We must use t::lib::Dates::compare to compare dates

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

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

t/db_dependent/Koha/Charges/Fees.t

index a204521..637aaa2 100644 (file)
@@ -25,6 +25,7 @@ use Test::Warn;
 
 use t::lib::Mocks;
 use t::lib::TestBuilder;
+use t::lib::Dates;
 
 use Time::Fake;
 use C4::Calendar;
@@ -198,7 +199,7 @@ subtest 'new' => sub {
             to_date => $dt_to,
         }
     );
-    is( $fees->from_date, dt_from_string(),
+    is( t::lib::Dates::compare($fees->from_date, dt_from_string()), 0,
         'from_date default set correctly to today' );
 };