diff --git a/t/db_dependent/api/v1/patrons_holds.t b/t/db_dependent/api/v1/patrons_holds.t index 569db8e178..99066428fd 100755 --- a/t/db_dependent/api/v1/patrons_holds.t +++ b/t/db_dependent/api/v1/patrons_holds.t @@ -36,7 +36,7 @@ t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 ); subtest 'list() tests' => sub { - plan tests => 18; + plan tests => 21; $schema->storage->txn_begin; @@ -81,6 +81,13 @@ subtest 'list() tests' => sub { 'Old holds even after item and library removed' ); + $old_hold_1->biblio->delete; + $t->get_ok( "//$userid:$password@/api/v1/patrons/" . $patron->id . '/holds?old=1&_order_by=+me.hold_id' ) + ->status_is( 200, 'REST3.2.2' )->json_is( + '' => [ $old_hold_1->get_from_storage->to_api, $hold_3->to_api ], + 'Old holds even after biblio removed' + ); + my $non_existent_patron = $builder->build_object( { class => 'Koha::Patrons' } ); my $non_existent_patron_id = $non_existent_patron->id;