diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t index 049a8f8635..4ec7f81c4b 100644 --- a/t/db_dependent/ILSDI_Services.t +++ b/t/db_dependent/ILSDI_Services.t @@ -299,7 +299,7 @@ subtest 'LookupPatron test' => sub { subtest 'Holds test' => sub { - plan tests => 4; + plan tests => 5; $schema->storage->txn_begin; @@ -350,6 +350,17 @@ subtest 'Holds test' => sub { $reply = C4::ILSDI::Services::HoldTitle( $query ); is( $reply->{code}, 'itemAlreadyOnHold', "Item already on hold" ); + my $biblio_with_no_item = $builder->build({ + source => 'Biblio', + }); + + $query = new CGI; + $query->param( 'patron_id', $patron->{borrowernumber}); + $query->param( 'bib_id', $biblio_with_no_item->{biblionumber}); + + $reply = C4::ILSDI::Services::HoldTitle( $query ); + is( $reply->{code}, 'NoItems', 'Biblio has no item' ); + my $biblio2 = $builder->build({ source => 'Biblio', });