From e14abbee37e6092568913c61594afcbf94e6fae9 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 4 Nov 2022 09:53:25 +0100 Subject: [PATCH] Bug 25503: Add failing test for _get_biblio_for_export --- t/db_dependent/Exporter/Record.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Exporter/Record.t b/t/db_dependent/Exporter/Record.t index 93b12fd87d..68fa733f7d 100755 --- a/t/db_dependent/Exporter/Record.t +++ b/t/db_dependent/Exporter/Record.t @@ -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 { -- 2.30.2