Lines 411-417
subtest 'Desks' => sub {
Link Here
|
411 |
}; |
411 |
}; |
412 |
|
412 |
|
413 |
subtest 'get_items_that_can_fill' => sub { |
413 |
subtest 'get_items_that_can_fill' => sub { |
414 |
plan tests => 3; |
414 |
plan tests => 5; |
415 |
|
415 |
|
416 |
my $biblio = $builder->build_sample_biblio; |
416 |
my $biblio = $builder->build_sample_biblio; |
417 |
my $itype_1 = $builder->build_object({ class => 'Koha::ItemTypes' }); # For 1, 2, 3, 4 |
417 |
my $itype_1 = $builder->build_object({ class => 'Koha::ItemTypes' }); # For 1, 2, 3, 4 |
Lines 503-508
subtest 'get_items_that_can_fill' => sub {
Link Here
|
503 |
is_deeply( [ map { $_->itemnumber } $items->as_list ], |
503 |
is_deeply( [ map { $_->itemnumber } $items->as_list ], |
504 |
[ $item_2->itemnumber ], 'Only item 2 is available for filling the hold' ); |
504 |
[ $item_2->itemnumber ], 'Only item 2 is available for filling the hold' ); |
505 |
|
505 |
|
|
|
506 |
my $no_holds = Koha::Holds->new->empty(); |
507 |
my $no_items = $no_holds->get_items_that_can_fill(); |
508 |
is( ref $no_items, "Koha::Items", "Routine returns a Koha::Items object"); |
509 |
is( $no_items->count, 0, "Object is empty when called on no holds"); |
510 |
|
506 |
}; |
511 |
}; |
507 |
|
512 |
|
508 |
subtest 'set_waiting+patron_expiration_date' => sub { |
513 |
subtest 'set_waiting+patron_expiration_date' => sub { |
509 |
- |
|
|