Lines 9-15
use C4::Items;
Link Here
|
9 |
use C4::Members; |
9 |
use C4::Members; |
10 |
use C4::Reserves; |
10 |
use C4::Reserves; |
11 |
|
11 |
|
12 |
use Test::More tests => 45; |
12 |
use Test::More tests => 47; |
13 |
|
13 |
|
14 |
BEGIN { |
14 |
BEGIN { |
15 |
use_ok('C4::Circulation'); |
15 |
use_ok('C4::Circulation'); |
Lines 261-266
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
261 |
$title, $checkitem, $found |
261 |
$title, $checkitem, $found |
262 |
); |
262 |
); |
263 |
|
263 |
|
|
|
264 |
C4::Context->set_preference('AllowRenewalIfOtherItemsAvailable', 1 ); |
265 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); |
266 |
is( $renewokay, 1, '(Bug 10663) Cannot renew, reserved'); |
267 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber2); |
268 |
is( $renewokay, 1, '(Bug 10663) Cannot renew, reserved'); |
269 |
C4::Context->set_preference('AllowRenewalIfOtherItemsAvailable', 0 ); |
270 |
|
264 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); |
271 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); |
265 |
is( $renewokay, 0, '(Bug 10663) Cannot renew, reserved'); |
272 |
is( $renewokay, 0, '(Bug 10663) Cannot renew, reserved'); |
266 |
is( $error, 'on_reserve', '(Bug 10663) Cannot renew, reserved (returned error is on_reserve)'); |
273 |
is( $error, 'on_reserve', '(Bug 10663) Cannot renew, reserved (returned error is on_reserve)'); |
267 |
- |
|
|