Lines 27-33
use C4::Overdues qw(UpdateFine);
Link Here
|
27 |
use Koha::DateUtils; |
27 |
use Koha::DateUtils; |
28 |
use Koha::Database; |
28 |
use Koha::Database; |
29 |
|
29 |
|
30 |
use Test::More tests => 61; |
30 |
use Test::More tests => 62; |
31 |
|
31 |
|
32 |
BEGIN { |
32 |
BEGIN { |
33 |
use_ok('C4::Circulation'); |
33 |
use_ok('C4::Circulation'); |
Lines 301-306
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
301 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber2); |
301 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber2); |
302 |
is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds'); |
302 |
is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds'); |
303 |
|
303 |
|
|
|
304 |
C4::Context->dbh->do("UPDATE items SET notforloan = 1 WHERE itemnumber = $itemnumber3"); |
305 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); |
306 |
is( $renewokay, 0, 'Bug 14337 - AllowRenewalIfOtherItemsAvailable counts holdable not for loan items when checking renewability'); |
307 |
C4::Context->dbh->do("UPDATE items SET notforloan = 0 WHERE itemnumber = $itemnumber3"); |
308 |
|
304 |
# Now let's add an item level hold, we should no longer be able to renew the item |
309 |
# Now let's add an item level hold, we should no longer be able to renew the item |
305 |
my $hold = Koha::Database->new()->schema()->resultset('Reserve')->create( |
310 |
my $hold = Koha::Database->new()->schema()->resultset('Reserve')->create( |
306 |
{ |
311 |
{ |
307 |
- |
|
|