Bug 3142: Add tests for item-level_itypes=0
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
1aa70c9bb6
commit
f2c7c9430b
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue