diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index d1b15fb4c7..6867f83a00 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -169,10 +169,10 @@ subtest q{Test Koha::Database->schema()->resultset('Item')->itemtype()} => sub { my $biblioitem = $biblio->biblioitem(); my ( $item ) = $biblioitem->items(); - C4::Context->set_preference( 'item-level_itypes', 0 ); + $schema->resultset('Systempreference')->update_or_create({ variable => 'item-level_itypes', value => 0 }); ok( $item->effective_itemtype() eq 'BIB_LEVEL', '$item->itemtype() returns biblioitem.itemtype when item-level_itypes is disabled' ); - C4::Context->set_preference( 'item-level_itypes', 1 ); + $schema->resultset('Systempreference')->update_or_create({ variable => 'item-level_itypes', value => 1 }); ok( $item->effective_itemtype() eq 'ITEM_LEVEL', '$item->itemtype() returns items.itype when item-level_itypes is disabled' );