Browse Source

Bug 19705: Try to fix random failures from DecreaseLoanHighHolds.t

No idea if it will do the trick, wait and see...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
18.05.x
Jonathan Druart 5 years ago
parent
commit
7e1c6dddde
  1. 5
      t/db_dependent/DecreaseLoanHighHolds.t

5
t/db_dependent/DecreaseLoanHighHolds.t

@ -16,6 +16,7 @@
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use DateTime;
use C4::Circulation;
use Koha::Database;
@ -42,6 +43,10 @@ $dbh->do('DELETE FROM issuingrules');
$dbh->do('DELETE FROM borrowers');
$dbh->do('DELETE FROM items');
my $now_value = DateTime->now();
my $mocked_datetime = Test::MockModule->new('DateTime');
$mocked_datetime->mock( 'now', sub { return $now_value; } );
my $library = $builder->build( { source => 'Branch' } );
my $category = $builder->build( { source => 'Category' } );
my $itemtype = $builder->build( { source => 'Itemtype' } )->{itemtype};

Loading…
Cancel
Save