Lines 529-542
subtest 'C4::Biblio::EmbedItemsInMarcBiblio' => sub {
Link Here
|
529 |
@items = $record->field($itemfield); |
529 |
@items = $record->field($itemfield); |
530 |
is( scalar @items, |
530 |
is( scalar @items, |
531 |
$number_of_items, |
531 |
$number_of_items, |
532 |
'Even with OpacHiddenItems set, all items should have been embeded' ); |
532 |
'Even with OpacHiddenItems set, all items should have been embedded' ); |
533 |
|
533 |
|
534 |
C4::Biblio::EmbedItemsInMarcBiblio( $record, $biblionumber, undef, 1 ); |
534 |
C4::Biblio::EmbedItemsInMarcBiblio( $record, $biblionumber, undef, 1 ); |
535 |
@items = $record->field($itemfield); |
535 |
@items = $record->field($itemfield); |
536 |
is( |
536 |
is( |
537 |
scalar @items, |
537 |
scalar @items, |
538 |
$number_of_items - $number_of_items_with_homebranch_is_CPL, |
538 |
$number_of_items - $number_of_items_with_homebranch_is_CPL, |
539 |
'For OPAC, the pref OpacHiddenItems should have been take into account. Only items with homebranch ne CPL should have been embeded' |
539 |
'For OPAC, the pref OpacHiddenItems should have been take into account. Only items with homebranch ne CPL should have been embedded' |
540 |
); |
540 |
); |
541 |
|
541 |
|
542 |
$opachiddenitems = " |
542 |
$opachiddenitems = " |
Lines 547-553
subtest 'C4::Biblio::EmbedItemsInMarcBiblio' => sub {
Link Here
|
547 |
is( |
547 |
is( |
548 |
scalar @items, |
548 |
scalar @items, |
549 |
0, |
549 |
0, |
550 |
'For OPAC, If all items are hidden, no item should have been embeded' |
550 |
'For OPAC, If all items are hidden, no item should have been embedded' |
551 |
); |
551 |
); |
552 |
|
552 |
|
553 |
$schema->storage->txn_rollback; |
553 |
$schema->storage->txn_rollback; |
554 |
- |
|
|