|
Lines 4957-4963
subtest "SendCirculationAlert" => sub {
Link Here
|
| 4957 |
}; |
4957 |
}; |
| 4958 |
|
4958 |
|
| 4959 |
subtest "GetSoonestRenewDate tests" => sub { |
4959 |
subtest "GetSoonestRenewDate tests" => sub { |
| 4960 |
plan tests => 4; |
4960 |
plan tests => 5; |
| 4961 |
Koha::CirculationRules->set_rule( |
4961 |
Koha::CirculationRules->set_rule( |
| 4962 |
{ |
4962 |
{ |
| 4963 |
categorycode => undef, |
4963 |
categorycode => undef, |
|
Lines 5007-5013
subtest "GetSoonestRenewDate tests" => sub {
Link Here
|
| 5007 |
'Checkouts without auto-renewal can be renewed immediately if no norenewalbefore' |
5007 |
'Checkouts without auto-renewal can be renewed immediately if no norenewalbefore' |
| 5008 |
); |
5008 |
); |
| 5009 |
|
5009 |
|
|
|
5010 |
t::lib::Mocks::mock_preference( 'NoRenewalBeforePrecision', 'date' ); |
| 5010 |
$issue->auto_renew(1)->store; |
5011 |
$issue->auto_renew(1)->store; |
|
|
5012 |
is( |
| 5013 |
GetSoonestRenewDate( $patron->id, $item->itemnumber ), |
| 5014 |
$datedue->clone->truncate( to => 'day' ), |
| 5015 |
'Checkouts with auto-renewal can be renewed earliest on due date if no renewalbefore' |
| 5016 |
); |
| 5017 |
t::lib::Mocks::mock_preference( 'NoRenewalBeforePrecision', 'exact' ); |
| 5011 |
is( |
5018 |
is( |
| 5012 |
GetSoonestRenewDate( $patron->id, $item->itemnumber ), |
5019 |
GetSoonestRenewDate( $patron->id, $item->itemnumber ), |
| 5013 |
$datedue, |
5020 |
$datedue, |
| 5014 |
- |
|
|