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:
Julian Maurice 2022-11-04 09:53:25 +01:00 committed by Tomas Cohen Arazi
parent a87315e682
commit 436d9b044e
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 11 additions and 1 deletions

View File

@ -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 {