@@ -, +, @@ --- t/db_dependent/Koha/Items.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/t/db_dependent/Koha/Items.t +++ a/t/db_dependent/Koha/Items.t @@ -1510,7 +1510,7 @@ subtest 'can_be_transferred' => sub { }; subtest 'filter_by_for_hold' => sub { - plan tests => 11; + plan tests => 12; my $biblio = $builder->build_sample_biblio; is( $biblio->items->filter_by_for_hold->count, 0, 'no item yet' ); @@ -1567,6 +1567,12 @@ subtest 'filter_by_for_hold' => sub { $itemtype->notforloan(1)->store; is( $biblio->items->filter_by_for_hold->count, 6, '6 items for hold - notforloan' ); + t::lib::Mocks::mock_preference('item-level_itypes', 0); + $biblio->biblioitem->itemtype($not_holdable_itemtype)->store; + is( $biblio->items->filter_by_for_hold->count, 0, '0 item-level_itypes=0' ); + + t::lib::Mocks::mock_preference('item-level_itypes', 1); + $biblio->delete; }; --