@@ -, +, @@ --- t/db_dependent/Circulation.t | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -27,7 +27,7 @@ use C4::Overdues qw(UpdateFine); use Koha::DateUtils; use Koha::Database; -use Test::More tests => 61; +use Test::More tests => 62; BEGIN { use_ok('C4::Circulation'); @@ -301,6 +301,11 @@ C4::Context->dbh->do("DELETE FROM accountlines"); ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber2); is( $renewokay, 1, 'Bug 11634 - Allow renewal of item with unfilled holds if other available items can fill those holds'); + C4::Context->dbh->do("UPDATE items SET notforloan = 1 WHERE itemnumber = $itemnumber3"); + ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber); + is( $renewokay, 0, 'Bug 14337 - AllowRenewalIfOtherItemsAvailable counts holdable not for loan items when checking renewability'); + C4::Context->dbh->do("UPDATE items SET notforloan = 0 WHERE itemnumber = $itemnumber3"); + # Now let's add an item level hold, we should no longer be able to renew the item my $hold = Koha::Database->new()->schema()->resultset('Reserve')->create( { --