Bug 5786 - Move AllowOnShelfHolds and OPACItemHolds system prefs to the Circulation...
[koha.git] / t / db_dependent / Circulation.t
index 3a79808..5b5a3e6 100755 (executable)
@@ -95,7 +95,7 @@ is(
 
 # Now, set a userenv
 C4::Context->_new_userenv('xxx');
-C4::Context::set_userenv(0,0,0,'firstname','surname', 'MPL', 'Midway Public Library', '', '', '');
+C4::Context->set_userenv(0,0,0,'firstname','surname', 'MPL', 'Midway Public Library', '', '', '');
 is(C4::Context->userenv->{branch}, 'MPL', 'userenv set');
 
 # Userenv set, PickupLibrary
@@ -291,6 +291,7 @@ C4::Context->dbh->do("DELETE FROM accountlines");
     );
 
     # Testing of feature to allow the renewal of reserved items if other items on the record can fill all needed holds
+    C4::Context->dbh->do("UPDATE issuingrules SET onshelfholds = 1");
     C4::Context->set_preference('AllowRenewalIfOtherItemsAvailable', 1 );
     ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber);
     is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds');