From ab30e5a5bcda85094e4d6b16de3e2d9e95b52ccc Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 17 Jul 2026 20:23:11 +0000 Subject: [PATCH] Bug 41879: (follow-up) Add a test Signed-off-by: Lucas Gass --- t/db_dependent/Koha/Hold.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Hold.t b/t/db_dependent/Koha/Hold.t index 64b8060b2f..a38a0fea21 100755 --- a/t/db_dependent/Koha/Hold.t +++ b/t/db_dependent/Koha/Hold.t @@ -1750,7 +1750,7 @@ subtest 'revert_found() tests' => sub { }; }; subtest 'move_hold() tests' => sub { - plan tests => 24; + plan tests => 26; $schema->storage->txn_begin; my $patron = Koha::Patron->new( @@ -2016,6 +2016,11 @@ subtest 'move_hold() tests' => sub { my $result_8 = $hold_9->move_hold( { new_itemnumber => $item_2->itemnumber } ); ok( $result_8->{success}, 'Item level move succeeds when pickup branch matches fulfillment policy' ); + my $empty_biblio = $builder->build_sample_biblio; + $result = $hold->move_hold( { new_biblionumber => $empty_biblio->biblionumber } ); + is( $result->{success}, 0, 'Move to biblio without items fails' ); + is( $result->{error}, 'noItemsOnBib', 'noItemsOnBib error returned' ); + $schema->storage->txn_rollback; };