From 1090e9f767f7aee7c4223984598a751040bca5b9 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 25 Oct 2019 11:42:50 +0200 Subject: [PATCH] Bug 23413: Fix tests --- t/db_dependent/Koha/Items.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Items.t b/t/db_dependent/Koha/Items.t index 0d601b1e19..5f97d46c06 100644 --- a/t/db_dependent/Koha/Items.t +++ b/t/db_dependent/Koha/Items.t @@ -82,7 +82,7 @@ subtest 'holds' => sub { biblionumber => $biblio->biblionumber, }); $nb_of_items++; - is($item->holds(), undef, "Nothing returned if no holds"); + is($item->holds->count, 0, "Nothing returned if no holds"); my $hold1 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'T' }}); my $hold2 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'W' }}); my $hold3 = $builder->build({ source => 'Reserve', value => { itemnumber=>$item->itemnumber, found => 'W' }}); @@ -90,7 +90,7 @@ subtest 'holds' => sub { is($item->holds()->count,3,"Three holds found"); is($item->holds({found => 'W'})->count,2,"Two waiting holds found"); is_deeply($item->holds({found => 'T'})->next->unblessed,$hold1,"Found transit holds matches the hold"); - is($item->holds({found => undef}),undef,"Nothing returned if no matching holds"); + is($item->holds({found => undef})->count, 0,"Nothing returned if no matching holds"); }; subtest 'biblio' => sub { -- 2.11.0