Lines 1510-1516
subtest 'can_be_transferred' => sub {
Link Here
|
1510 |
}; |
1510 |
}; |
1511 |
|
1511 |
|
1512 |
subtest 'filter_by_for_hold' => sub { |
1512 |
subtest 'filter_by_for_hold' => sub { |
1513 |
plan tests => 11; |
1513 |
plan tests => 12; |
1514 |
|
1514 |
|
1515 |
my $biblio = $builder->build_sample_biblio; |
1515 |
my $biblio = $builder->build_sample_biblio; |
1516 |
is( $biblio->items->filter_by_for_hold->count, 0, 'no item yet' ); |
1516 |
is( $biblio->items->filter_by_for_hold->count, 0, 'no item yet' ); |
Lines 1567-1572
subtest 'filter_by_for_hold' => sub {
Link Here
|
1567 |
$itemtype->notforloan(1)->store; |
1567 |
$itemtype->notforloan(1)->store; |
1568 |
is( $biblio->items->filter_by_for_hold->count, 6, '6 items for hold - notforloan' ); |
1568 |
is( $biblio->items->filter_by_for_hold->count, 6, '6 items for hold - notforloan' ); |
1569 |
|
1569 |
|
|
|
1570 |
t::lib::Mocks::mock_preference('item-level_itypes', 0); |
1571 |
$biblio->biblioitem->itemtype($not_holdable_itemtype)->store; |
1572 |
is( $biblio->items->filter_by_for_hold->count, 0, '0 item-level_itypes=0' ); |
1573 |
|
1574 |
t::lib::Mocks::mock_preference('item-level_itypes', 1); |
1575 |
|
1570 |
$biblio->delete; |
1576 |
$biblio->delete; |
1571 |
}; |
1577 |
}; |
1572 |
|
1578 |
|
1573 |
- |
|
|