Lines 961-966
subtest 'reserves.item_level_hold' => sub {
Link Here
|
961 |
); |
961 |
); |
962 |
} ); |
962 |
} ); |
963 |
|
963 |
|
|
|
964 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 1 ); |
965 |
|
964 |
# Revert the waiting status |
966 |
# Revert the waiting status |
965 |
C4::Reserves::RevertWaitingStatus( |
967 |
C4::Reserves::RevertWaitingStatus( |
966 |
{ itemnumber => $item->itemnumber } ); |
968 |
{ itemnumber => $item->itemnumber } ); |
Lines 969-974
subtest 'reserves.item_level_hold' => sub {
Link Here
|
969 |
|
971 |
|
970 |
is( $hold->itemnumber, $item->itemnumber, 'Itemnumber should not be removed when the waiting status is revert' ); |
972 |
is( $hold->itemnumber, $item->itemnumber, 'Itemnumber should not be removed when the waiting status is revert' ); |
971 |
|
973 |
|
|
|
974 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 0 ); |
975 |
|
976 |
$hold->set_waiting; |
977 |
|
978 |
# Revert the waiting status, RealTimeHoldsQueue => shouldn't add a test |
979 |
C4::Reserves::RevertWaitingStatus( |
980 |
{ itemnumber => $item->itemnumber } ); |
981 |
|
972 |
$hold->delete; # cleanup |
982 |
$hold->delete; # cleanup |
973 |
}; |
983 |
}; |
974 |
|
984 |
|
Lines 1428-1433
subtest 'AddReserve() tests' => sub {
Link Here
|
1428 |
); |
1438 |
); |
1429 |
} ); |
1439 |
} ); |
1430 |
|
1440 |
|
|
|
1441 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 1 ); |
1442 |
|
1443 |
AddReserve( |
1444 |
{ |
1445 |
branchcode => $library->branchcode, |
1446 |
borrowernumber => $patron->id, |
1447 |
biblionumber => $biblio->id, |
1448 |
} |
1449 |
); |
1450 |
|
1451 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 0 ); |
1452 |
|
1431 |
AddReserve( |
1453 |
AddReserve( |
1432 |
{ |
1454 |
{ |
1433 |
branchcode => $library->branchcode, |
1455 |
branchcode => $library->branchcode, |
Lines 1483-1488
subtest 'AlterPriorty() tests' => sub {
Link Here
|
1483 |
); |
1505 |
); |
1484 |
} ); |
1506 |
} ); |
1485 |
|
1507 |
|
|
|
1508 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 1 ); |
1486 |
|
1509 |
|
1487 |
AlterPriority( "bottom", $reserve_id, 1, 2, 1, 3 ); |
1510 |
AlterPriority( "bottom", $reserve_id, 1, 2, 1, 3 ); |
1488 |
|
1511 |
|
Lines 1490-1494
subtest 'AlterPriorty() tests' => sub {
Link Here
|
1490 |
|
1513 |
|
1491 |
is($hold->priority,3,'Successfully altered priority to bottom'); |
1514 |
is($hold->priority,3,'Successfully altered priority to bottom'); |
1492 |
|
1515 |
|
|
|
1516 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 0 ); |
1517 |
|
1518 |
AlterPriority( "bottom", $reserve_id, 1, 2, 1, 3 ); |
1519 |
|
1493 |
$schema->storage->txn_rollback; |
1520 |
$schema->storage->txn_rollback; |
1494 |
}; |
1521 |
}; |
1495 |
- |
|
|