Bug 27992: [23.05] (follow-up) Fix unit test with unblessed patron

This commit is contained in:
Fridolin Somers 2023-11-13 09:12:08 -10:00
parent c0750bc6be
commit fc0c87bf3c
1 changed files with 1 additions and 1 deletions

View File

@ -2321,7 +2321,7 @@ subtest 'CanBookBeIssued + Statistic patrons "X"' => sub {
my $patron_2 = $builder->build_object(
{ class => 'Koha::Patrons', value => { categorycode => $patron_category->{categorycode} } } );
my $item_2 = $builder->build_sample_item( { library => $library->branchcode } );
my $issue = AddIssue( $patron_2, $item_2->barcode );
my $issue = AddIssue( $patron_2->unblessed, $item_2->barcode );
$item_2->discard_changes;
ok( $item_2->onloan, "Item is checked out" );