|
Lines 18-24
Link Here
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::NoWarnings; |
20 |
use Test::NoWarnings; |
| 21 |
use Test::More tests => 68; |
21 |
use Test::More tests => 69; |
| 22 |
use DateTime::Duration; |
22 |
use DateTime::Duration; |
| 23 |
|
23 |
|
| 24 |
use t::lib::Mocks; |
24 |
use t::lib::Mocks; |
|
Lines 421-426
is_deeply(
Link Here
|
| 421 |
"With issuing rules (renewal allowed, 1 remaining) and with a valid parameter, Getrenewcount of item1 returns 0 renews left" |
421 |
"With issuing rules (renewal allowed, 1 remaining) and with a valid parameter, Getrenewcount of item1 returns 0 renews left" |
| 422 |
); |
422 |
); |
| 423 |
|
423 |
|
|
|
424 |
# Check renewal due date when parameter due date is defined but empty |
| 425 |
Koha::CirculationRules->set_rules( |
| 426 |
{ |
| 427 |
categorycode => undef, |
| 428 |
itemtype => undef, |
| 429 |
branchcode => undef, |
| 430 |
rules => { |
| 431 |
renewalsallowed => 4, |
| 432 |
} |
| 433 |
} |
| 434 |
); |
| 435 |
my $datedue4 = AddRenewal( |
| 436 |
{ |
| 437 |
borrowernumber => $borrower_id1, |
| 438 |
itemnumber => $item_id1, |
| 439 |
branch => $branchcode_1, |
| 440 |
datedue => "", |
| 441 |
lastreneweddate => $daysago10 |
| 442 |
} |
| 443 |
); |
| 444 |
my $datedue4_date = output_pref( |
| 445 |
{ |
| 446 |
dt => $datedue4, |
| 447 |
dateformat => 'iso', |
| 448 |
timeformat => '24hr', |
| 449 |
dateonly => 1 |
| 450 |
} |
| 451 |
); |
| 452 |
ok( |
| 453 |
$datedue4_date ne $today, |
| 454 |
q{AddRenewal with a defined but empty due date does not set the due date to today} |
| 455 |
); |
| 456 |
|
| 424 |
$dbh->do("DELETE FROM old_issues"); |
457 |
$dbh->do("DELETE FROM old_issues"); |
| 425 |
AddReturn($barcode_1); |
458 |
AddReturn($barcode_1); |
| 426 |
my $return = |
459 |
my $return = |
| 427 |
- |
|
|