Lines 283-289
subtest 'duplicate_to | add_item' => sub {
Link Here
|
283 |
$schema->storage->txn_rollback; |
283 |
$schema->storage->txn_rollback; |
284 |
}; |
284 |
}; |
285 |
|
285 |
|
286 |
subtest 'current_holds() tests' => sub { |
286 |
subtest 'current_item_level_holds() tests' => sub { |
287 |
|
287 |
|
288 |
plan tests => 3; |
288 |
plan tests => 3; |
289 |
|
289 |
|
Lines 328-343
subtest 'current_holds() tests' => sub {
Link Here
|
328 |
} |
328 |
} |
329 |
); |
329 |
); |
330 |
|
330 |
|
331 |
is( $order->current_holds, undef, 'Returns undef if no linked biblio'); |
331 |
is( $order->current_item_level_holds, undef, 'Returns undef if no linked biblio'); |
332 |
|
332 |
|
333 |
$order->set({ biblionumber => $biblio->biblionumber })->store->discard_changes; |
333 |
$order->set({ biblionumber => $biblio->biblionumber })->store->discard_changes; |
334 |
|
334 |
|
335 |
is( $order->current_holds, undef, 'Returns undef if no linked items'); |
335 |
is( $order->current_item_level_holds, undef, 'Returns undef if no linked items'); |
336 |
|
336 |
|
337 |
$order->add_item( $item_2->itemnumber ); |
337 |
$order->add_item( $item_2->itemnumber ); |
338 |
$order->add_item( $item_3->itemnumber ); |
338 |
$order->add_item( $item_3->itemnumber ); |
339 |
|
339 |
|
340 |
is( $order->current_holds->count, 1, 'Only current (not future) holds are returned'); |
340 |
is( $order->current_item_level_holds->count, 1, 'Only current (not future) holds are returned'); |
341 |
|
341 |
|
342 |
$schema->storage->txn_rollback; |
342 |
$schema->storage->txn_rollback; |
343 |
}; |
343 |
}; |
344 |
- |
|
|