Bug 24200: (follow-up) Try to fix random failures from Borrower_PrevCheckout.t

2 other occurrences where missing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-03-18 13:43:52 +01:00 committed by Martin Renvoize
parent b961f2d764
commit 9c265dc6b0
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -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});