|
Lines 536-542
ok( !C4::Reserves::OnShelfHoldsAllowed($item, $borrower), "OnShelfHoldsAllowed()
Link Here
|
| 536 |
|
536 |
|
| 537 |
$dbh->do("DELETE FROM reserves WHERE biblionumber=?",undef,($bibnum)); |
537 |
$dbh->do("DELETE FROM reserves WHERE biblionumber=?",undef,($bibnum)); |
| 538 |
my ( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
538 |
my ( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
| 539 |
ok( !$bz14464_fines, 'Bug 14464 - No fines at beginning' ); |
539 |
is( !$bz14464_fines || $bz14464_fines==0, 1, 'Bug 14464 - No fines at beginning' ); |
| 540 |
|
540 |
|
| 541 |
# First, test cancelling a reserve when there's no charge configured. |
541 |
# First, test cancelling a reserve when there's no charge configured. |
| 542 |
t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelayCharge', 0); |
542 |
t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelayCharge', 0); |
|
Lines 560-566
ok( $bz14464_reserve, 'Bug 14464 - 1st reserve correctly created' );
Link Here
|
| 560 |
CancelReserve({ reserve_id => $bz14464_reserve, charge_cancel_fee => 1 }); |
560 |
CancelReserve({ reserve_id => $bz14464_reserve, charge_cancel_fee => 1 }); |
| 561 |
|
561 |
|
| 562 |
( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
562 |
( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
| 563 |
ok( !$bz14464_fines, 'Bug 14464 - No fines after cancelling reserve with no charge configured' ); |
563 |
is( !$bz14464_fines || $bz14464_fines==0, 1, 'Bug 14464 - No fines after cancelling reserve with no charge configured' ); |
| 564 |
|
564 |
|
| 565 |
# Then, test cancelling a reserve when there's no charge desired. |
565 |
# Then, test cancelling a reserve when there's no charge desired. |
| 566 |
t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelayCharge', 42); |
566 |
t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelayCharge', 42); |
|
Lines 584-590
ok( $bz14464_reserve, 'Bug 14464 - 2nd reserve correctly created' );
Link Here
|
| 584 |
CancelReserve({ reserve_id => $bz14464_reserve }); |
584 |
CancelReserve({ reserve_id => $bz14464_reserve }); |
| 585 |
|
585 |
|
| 586 |
( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
586 |
( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
| 587 |
ok( !$bz14464_fines, 'Bug 14464 - No fines after cancelling reserve with no charge desired' ); |
587 |
is( !$bz14464_fines || $bz14464_fines==0, 1, 'Bug 14464 - No fines after cancelling reserve with no charge desired' ); |
| 588 |
|
588 |
|
| 589 |
# Finally, test cancelling a reserve when there's a charge desired and configured. |
589 |
# Finally, test cancelling a reserve when there's a charge desired and configured. |
| 590 |
$bz14464_reserve = AddReserve( |
590 |
$bz14464_reserve = AddReserve( |
| 591 |
- |
|
|