Bug 25729: Prevent Charges/Fees.t to fail on slow server

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>
This commit is contained in:
Jonathan Druart 2020-07-27 15:15:44 +02:00
parent b4f3a0f0a6
commit fcd659b2d4
1 changed files with 2 additions and 1 deletions

View 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' );
};