Lines 26-32
use C4::Reserves;
Link Here
|
26 |
use Koha::DateUtils; |
26 |
use Koha::DateUtils; |
27 |
use Koha::Database; |
27 |
use Koha::Database; |
28 |
|
28 |
|
29 |
use Test::More tests => 55; |
29 |
use Test::More tests => 57; |
30 |
|
30 |
|
31 |
BEGIN { |
31 |
BEGIN { |
32 |
use_ok('C4::Circulation'); |
32 |
use_ok('C4::Circulation'); |
Lines 282-287
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
282 |
$title, $checkitem, $found |
282 |
$title, $checkitem, $found |
283 |
); |
283 |
); |
284 |
|
284 |
|
|
|
285 |
C4::Context->set_preference('AllowRenewalIfOtherItemsAvailable', 1 ); |
286 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); |
287 |
is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds'); |
288 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber2); |
289 |
is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds'); |
290 |
C4::Context->set_preference('AllowRenewalIfOtherItemsAvailable', 0 ); |
291 |
|
285 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); |
292 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); |
286 |
is( $renewokay, 0, '(Bug 10663) Cannot renew, reserved'); |
293 |
is( $renewokay, 0, '(Bug 10663) Cannot renew, reserved'); |
287 |
is( $error, 'on_reserve', '(Bug 10663) Cannot renew, reserved (returned error is on_reserve)'); |
294 |
is( $error, 'on_reserve', '(Bug 10663) Cannot renew, reserved (returned error is on_reserve)'); |
288 |
- |
|
|