@@ -, +, @@ --- t/db_dependent/Holds.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/t/db_dependent/Holds.t +++ a/t/db_dependent/Holds.t @@ -1706,7 +1706,7 @@ subtest 'ModReserve can only update expirationdate for found holds' => sub { }; subtest 'Koha::Holds->get_items_that_can_fill returns items with datecancelled or (inclusive) datearrived' => sub { - plan tests => 5; + plan tests => 8; # biblio item with date arrived and date cancelled my $biblio1 = $builder->build_sample_biblio(); my $item1 = $builder->build_sample_item({ biblionumber => $biblio1->biblionumber }); @@ -1788,6 +1788,9 @@ subtest 'Koha::Holds->get_items_that_can_fill returns items with datecancelled o is($items_that_can_fill1->next->id, $item1->id, "Koha::Holds->get_items_that_can_fill returns item with defined datearrived and datecancelled"); is($items_that_can_fill1->count, 1, "Koha::Holds->get_items_that_can_fill returns 1 item with correct parameters"); is($items_that_can_fill2->next->id, $item2->id, "Koha::Holds->get_items_that_can_fill returns item with defined datearrived and undefined datecancelled"); + is($items_that_can_fill2->count, 1, "Koha::Holds->get_items_that_can_fill returns 1 item with correct parameters"); is($items_that_can_fill3->next->id, $item3->id, "Koha::Holds->get_items_that_can_fill returns item with undefined datearrived and defined datecancelled"); + is($items_that_can_fill3->count, 1, "Koha::Holds->get_items_that_can_fill returns 1 item with correct parameters"); is($items_that_can_fill4->next, undef, "Koha::Holds->get_items_that_can_fill doesn't return item with undefined datearrived and undefined datecancelled"); + is($items_that_can_fill4->count, 0, "Koha::Holds->get_items_that_can_fill returns 0 item"); } --