|
Lines 336-342
subtest 'pickup_locations' => sub {
Link Here
|
| 336 |
}; |
336 |
}; |
| 337 |
|
337 |
|
| 338 |
subtest 'deletion' => sub { |
338 |
subtest 'deletion' => sub { |
| 339 |
plan tests => 11; |
339 |
plan tests => 12; |
| 340 |
|
340 |
|
| 341 |
$schema->storage->txn_begin; |
341 |
$schema->storage->txn_begin; |
| 342 |
|
342 |
|
|
Lines 424-429
subtest 'deletion' => sub {
Link Here
|
| 424 |
|
424 |
|
| 425 |
} |
425 |
} |
| 426 |
|
426 |
|
|
|
427 |
{ # last_item_for_hold |
| 428 |
C4::Reserves::AddReserve($patron->branchcode, $patron->borrowernumber, $item->biblionumber ); |
| 429 |
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' ); |
| 430 |
|
| 431 |
# With another item attached to the biblio, the item can be deleted |
| 432 |
$builder->build_sample_item({ biblionumber => $item->biblionumber }); |
| 433 |
} |
| 434 |
|
| 427 |
is( |
435 |
is( |
| 428 |
$item->safe_to_delete, |
436 |
$item->safe_to_delete, |
| 429 |
1, |
437 |
1, |
| 430 |
- |
|
|