From 22e48c05e2311539078ca0801dc6b4278cf2f58d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 18 Mar 2020 13:43:52 +0100 Subject: [PATCH] Bug 24200: (follow-up) Try to fix random failures from Borrower_PrevCheckout.t 2 other occurrences where missing. Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit d4db0b96e8753b1b213b6a2efeea7a61baf0ac7e) Signed-off-by: Lucas Gass --- t/db_dependent/Patron/Borrower_PrevCheckout.t | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/t/db_dependent/Patron/Borrower_PrevCheckout.t b/t/db_dependent/Patron/Borrower_PrevCheckout.t index 8bd882cd86..77b51f5920 100644 --- a/t/db_dependent/Patron/Borrower_PrevCheckout.t +++ b/t/db_dependent/Patron/Borrower_PrevCheckout.t @@ -377,24 +377,8 @@ my $CBBI_patron = $builder->build({source => 'Borrower', value => { categorycode $patron = Koha::Patrons->find( $CBBI_patron->{borrowernumber} ); # Our Items -my $new_item = $builder->build({ - source => 'Item', - value => { - notforloan => 0, - withdrawn => 0, - itemlost => 0, - biblionumber => $builder->build( { source => 'Biblioitem' } )->{biblionumber}, - }, -}); -my $prev_item = $builder->build({ - source => 'Item', - value => { - notforloan => 0, - withdrawn => 0, - itemlost => 0, - biblionumber => $builder->build( { source => 'Biblioitem' } )->{biblionumber}, - }, -}); +my $new_item = $builder->build_sample_item->unblessed; +my $prev_item = $builder->build_sample_item->unblessed; # Second is Checked Out BAIL_OUT("CanBookBeIssued Issue failed") unless AddIssue($patron->unblessed, $prev_item->{barcode}); -- 2.39.5