Lines 441-455
subtest 'Renewal related tests' => sub {
Link Here
|
441 |
interface => 'commandline', |
441 |
interface => 'commandline', |
442 |
})->store; |
442 |
})->store; |
443 |
|
443 |
|
444 |
is( $line->renewable, 1, "Item is returned as renewable when it meets the conditions" ); |
444 |
is( $line->is_renewable, 1, "Item is returned as renewable when it meets the conditions" ); |
445 |
$line->amountoutstanding(5); |
445 |
$line->amountoutstanding(5); |
446 |
is( $line->renewable, 0, "Item is returned as unrenewable when it has outstanding fine" ); |
446 |
is( $line->is_renewable, 0, "Item is returned as unrenewable when it has outstanding fine" ); |
447 |
$line->amountoutstanding(0); |
447 |
$line->amountoutstanding(0); |
448 |
$line->debit_type_code("VOID"); |
448 |
$line->debit_type_code("VOID"); |
449 |
is( $line->renewable, 0, "Item is returned as unrenewable when it has the wrong account type" ); |
449 |
is( $line->is_renewable, 0, "Item is returned as unrenewable when it has the wrong account type" ); |
450 |
$line->debit_type_code("OVERDUE"); |
450 |
$line->debit_type_code("OVERDUE"); |
451 |
$line->status("RETURNED"); |
451 |
$line->status("RETURNED"); |
452 |
is( $line->renewable, 0, "Item is returned as unrenewable when it has the wrong account status" ); |
452 |
is( $line->is_renewable, 0, "Item is returned as unrenewable when it has the wrong account status" ); |
453 |
|
453 |
|
454 |
|
454 |
|
455 |
t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 0 ); |
455 |
t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 0 ); |
456 |
- |
|
|