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