From a3a64f66fb59c1d2421e6c4111e4df4c8e982211 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Fri, 25 Nov 2022 09:01:15 +0200 Subject: [PATCH 1/2] Bug 31447: Fix test Tests for this feature raised a new warning "Odd number of elements in anonymous hash". Setting $item->item_group as seperated variable removes this warning. To test prove t/db_dependent/Circulation.t. Sponsored-by: Koha-Suomi Oy --- t/db_dependent/Circulation.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index be02501f42..a7b4c70178 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -5709,6 +5709,8 @@ subtest "CanBookBeIssued + needsconfirmation message" => sub { my $biblioitem = $builder->build_object({ class => 'Koha::Biblioitems', value => { biblionumber => $biblio->biblionumber }}); my $item = $builder->build_object({ class => 'Koha::Items' , value => { biblionumber => $biblio->biblionumber }}); + my $item_group = $item->item_group; + my $hold = $builder->build_object({ class => 'Koha::Holds', value => { biblionumber => $item->biblionumber, branchcode => $library->branchcode, @@ -5717,7 +5719,7 @@ subtest "CanBookBeIssued + needsconfirmation message" => sub { priority => 1, found => undef, suspend => 0, - item_group_id => $item->item_group + item_group_id => $item_group, }}); my ( $error, $needsconfirmation, $alerts, $messages ); -- 2.34.1