Bug 39710: Unit test

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Nick Clemens 2025-04-23 12:15:52 +00:00 committed by Katrin Fischer
parent aff28d9fa6
commit 0fff879e40
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 8 additions and 1 deletions

View File

@ -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;