my %data = (
firstname => 'my firstname',
surname => 'my surname',
- categorycode => 'PT',
+ categorycode => 'UT',
branchcode => 'UT',
cardnumber => 'ilsdi-cardnumber',
userid => 'ilsdi-userid',
);
# Crate patron category
-unless ( GetBorrowercategory('PT') ) {
+unless ( GetBorrowercategory('UT') ) {
$dbh->do("INSERT INTO categories
(categorycode,description,enrolmentperiod,upperagelimit,enrolmentfee,overduenoticerequired,reservefee,category_type,default_privacy)
VALUES
- ('PT','Unit tester',99,99,0.000000,1,0.000000,'C','default');");
+ ('UT','Unit tester',99,99,0.000000,1,0.000000,'C','default');");
}
# Create branch
my $biblioitem = $biblio->biblioitem();
my ( $item ) = $biblioitem->items();
- $schema->resultset('Systempreference')->update_or_create({ variable => 'item-level_itypes', value => 0 });
+ C4::Context->set_preference( 'item-level_itypes', 0 );
ok( $item->effective_itemtype() eq 'BIB_LEVEL', '$item->itemtype() returns biblioitem.itemtype when item-level_itypes is disabled' );
- $schema->resultset('Systempreference')->update_or_create({ variable => 'item-level_itypes', value => 1 });
+ C4::Context->set_preference( 'item-level_itypes', 1 );
ok( $item->effective_itemtype() eq 'ITEM_LEVEL', '$item->itemtype() returns items.itype when item-level_itypes is disabled' );