|
Lines 342-348
subtest 'pickup_locations' => sub {
Link Here
|
| 342 |
}; |
342 |
}; |
| 343 |
|
343 |
|
| 344 |
subtest 'deletion' => sub { |
344 |
subtest 'deletion' => sub { |
| 345 |
plan tests => 11; |
345 |
plan tests => 12; |
| 346 |
|
346 |
|
| 347 |
$schema->storage->txn_begin; |
347 |
$schema->storage->txn_begin; |
| 348 |
|
348 |
|
|
Lines 430-435
subtest 'deletion' => sub {
Link Here
|
| 430 |
|
430 |
|
| 431 |
} |
431 |
} |
| 432 |
|
432 |
|
|
|
433 |
{ # last_item_for_hold |
| 434 |
C4::Reserves::AddReserve($patron->branchcode, $patron->borrowernumber, $item->biblionumber ); |
| 435 |
is( $item->safe_to_delete, 'last_item_for_hold', 'Item cannot be deleted if a biblio-level is placed on the biblio and there is only 1 item attached to the biblio' ); |
| 436 |
|
| 437 |
# With another item attached to the biblio, the item can be deleted |
| 438 |
$builder->build_sample_item({ biblionumber => $item->biblionumber }); |
| 439 |
} |
| 440 |
|
| 433 |
is( |
441 |
is( |
| 434 |
$item->safe_to_delete, |
442 |
$item->safe_to_delete, |
| 435 |
1, |
443 |
1, |
| 436 |
- |
|
|