Lines 414-419
subtest 'get_items_that_can_fill' => sub {
Link Here
|
414 |
|
414 |
|
415 |
my $biblio = $builder->build_sample_biblio; |
415 |
my $biblio = $builder->build_sample_biblio; |
416 |
my $item_1 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } ); |
416 |
my $item_1 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } ); |
|
|
417 |
# waiting |
417 |
my $item_2 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } ); |
418 |
my $item_2 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } ); |
418 |
my $item_3 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } ) |
419 |
my $item_3 = $builder->build_sample_item( { biblionumber => $biblio->biblionumber } ) |
419 |
; # onloan |
420 |
; # onloan |
Lines 481-487
subtest 'get_items_that_can_fill' => sub {
Link Here
|
481 |
|
482 |
|
482 |
my @items = $holds->get_items_that_can_fill; |
483 |
my @items = $holds->get_items_that_can_fill; |
483 |
is_deeply( [ map { $_->itemnumber } @items ], |
484 |
is_deeply( [ map { $_->itemnumber } @items ], |
484 |
[ $item_2->itemnumber, $item_5->itemnumber ], 'Only item 1 and 5 are available for filling the hold' ); |
485 |
[ $item_2->itemnumber, $item_5->itemnumber ], 'Only item 2 and 5 are available for filling the hold' ); |
485 |
}; |
486 |
}; |
486 |
|
487 |
|
487 |
$schema->storage->txn_rollback; |
488 |
$schema->storage->txn_rollback; |
488 |
- |
|
|