Lines 1455-1461
$schema->storage->txn_rollback();
Link Here
|
1455 |
|
1455 |
|
1456 |
subtest 'IsAvailableForItemLevelRequest() tests' => sub { |
1456 |
subtest 'IsAvailableForItemLevelRequest() tests' => sub { |
1457 |
|
1457 |
|
1458 |
plan tests => 2; |
1458 |
plan tests => 3; |
1459 |
|
1459 |
|
1460 |
$schema->storage->txn_begin; |
1460 |
$schema->storage->txn_begin; |
1461 |
|
1461 |
|
Lines 1487-1492
subtest 'IsAvailableForItemLevelRequest() tests' => sub {
Link Here
|
1487 |
"Item not available for item-level hold because no effective item type" |
1487 |
"Item not available for item-level hold because no effective item type" |
1488 |
); |
1488 |
); |
1489 |
|
1489 |
|
|
|
1490 |
ok( |
1491 |
!C4::Reserves::IsAvailableForItemLevelRequest( $item, undef ), |
1492 |
"Item not available for item-level hold because no patron defined" |
1493 |
); |
1494 |
|
1490 |
$schema->storage->txn_rollback; |
1495 |
$schema->storage->txn_rollback; |
1491 |
}; |
1496 |
}; |
1492 |
|
1497 |
|
Lines 1594-1600
subtest 'AlterPriorty() tests' => sub {
Link Here
|
1594 |
|
1599 |
|
1595 |
subtest 'CanBookBeReserved() tests' => sub { |
1600 |
subtest 'CanBookBeReserved() tests' => sub { |
1596 |
|
1601 |
|
1597 |
plan tests => 2; |
1602 |
plan tests => 3; |
1598 |
|
1603 |
|
1599 |
$schema->storage->txn_begin; |
1604 |
$schema->storage->txn_begin; |
1600 |
|
1605 |
|
Lines 1665-1670
subtest 'CanBookBeReserved() tests' => sub {
Link Here
|
1665 |
{ itemtype => $itype->id } ); |
1670 |
{ itemtype => $itype->id } ); |
1666 |
is_deeply( $res, { status => '' }, 'Holds on itemtype limit reached' ); |
1671 |
is_deeply( $res, { status => '' }, 'Holds on itemtype limit reached' ); |
1667 |
|
1672 |
|
|
|
1673 |
$res = CanBookBeReserved( undef, $biblio->id, $library->id, |
1674 |
{ itemtype => $itype->id } ); |
1675 |
is_deeply( $res, { status => '' }, 'Patron id undefined' ); |
1676 |
|
1668 |
$schema->storage->txn_rollback; |
1677 |
$schema->storage->txn_rollback; |
1669 |
}; |
1678 |
}; |
1670 |
|
1679 |
|
1671 |
- |
|
|