|
Lines 1445-1451
$schema->storage->txn_rollback();
Link Here
|
| 1445 |
|
1445 |
|
| 1446 |
subtest 'IsAvailableForItemLevelRequest() tests' => sub { |
1446 |
subtest 'IsAvailableForItemLevelRequest() tests' => sub { |
| 1447 |
|
1447 |
|
| 1448 |
plan tests => 2; |
1448 |
plan tests => 3; |
| 1449 |
|
1449 |
|
| 1450 |
$schema->storage->txn_begin; |
1450 |
$schema->storage->txn_begin; |
| 1451 |
|
1451 |
|
|
Lines 1477-1482
subtest 'IsAvailableForItemLevelRequest() tests' => sub {
Link Here
|
| 1477 |
"Item not available for item-level hold because no effective item type" |
1477 |
"Item not available for item-level hold because no effective item type" |
| 1478 |
); |
1478 |
); |
| 1479 |
|
1479 |
|
|
|
1480 |
ok( |
| 1481 |
!C4::Reserves::IsAvailableForItemLevelRequest( $item, undef ), |
| 1482 |
"Item not available for item-level hold because no patron defined" |
| 1483 |
); |
| 1484 |
|
| 1480 |
$schema->storage->txn_rollback; |
1485 |
$schema->storage->txn_rollback; |
| 1481 |
}; |
1486 |
}; |
| 1482 |
|
1487 |
|
|
Lines 1584-1590
subtest 'AlterPriorty() tests' => sub {
Link Here
|
| 1584 |
|
1589 |
|
| 1585 |
subtest 'CanBookBeReserved() tests' => sub { |
1590 |
subtest 'CanBookBeReserved() tests' => sub { |
| 1586 |
|
1591 |
|
| 1587 |
plan tests => 2; |
1592 |
plan tests => 3; |
| 1588 |
|
1593 |
|
| 1589 |
$schema->storage->txn_begin; |
1594 |
$schema->storage->txn_begin; |
| 1590 |
|
1595 |
|
|
Lines 1655-1660
subtest 'CanBookBeReserved() tests' => sub {
Link Here
|
| 1655 |
{ itemtype => $itype->id } ); |
1660 |
{ itemtype => $itype->id } ); |
| 1656 |
is_deeply( $res, { status => '' }, 'Holds on itemtype limit reached' ); |
1661 |
is_deeply( $res, { status => '' }, 'Holds on itemtype limit reached' ); |
| 1657 |
|
1662 |
|
|
|
1663 |
$res = CanBookBeReserved( undef, $biblio->id, $library->id, |
| 1664 |
{ itemtype => $itype->id } ); |
| 1665 |
is_deeply( $res, { status => '' }, 'Patron id undefined' ); |
| 1666 |
|
| 1658 |
$schema->storage->txn_rollback; |
1667 |
$schema->storage->txn_rollback; |
| 1659 |
}; |
1668 |
}; |
| 1660 |
|
1669 |
|
| 1661 |
- |
|
|