Bug 25503: Add failing test for _get_biblio_for_export
Signed-off-by: Marie-Luce <marie-luce.laflamme@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> https://bugs.koha-community.org/show_bug.cgi?id=25508 Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
a87315e682
commit
436d9b044e
|
|
@ -222,7 +222,7 @@ subtest 'export without record_type' => sub {
|
|||
};
|
||||
|
||||
subtest '_get_biblio_for_export' => sub {
|
||||
plan tests => 4;
|
||||
plan tests => 5;
|
||||
|
||||
my $biblio = $builder->build_sample_biblio(
|
||||
{
|
||||
|
|
@ -281,6 +281,16 @@ subtest '_get_biblio_for_export' => sub {
|
|||
@items = $record->field($item_field_tag);
|
||||
is( scalar @items, 0, "We should not have any items if we don't request items and pass a branch");
|
||||
|
||||
$record = Koha::Exporter::Record::_get_biblio_for_export(
|
||||
{
|
||||
biblionumber => $biblionumber,
|
||||
export_items => 1,
|
||||
itemnumbers => [$item_branch_a->itemnumber],
|
||||
}
|
||||
);
|
||||
@items = $record->field($item_field_tag);
|
||||
is( scalar @items, 1, "We should have only items requested if we pass itemnumbers");
|
||||
|
||||
};
|
||||
|
||||
subtest '_get_record_for_export MARC field conditions' => sub {
|
||||
|
|
|
|||
Loading…
Reference in New Issue