From 436d9b044e151aeeb343b146861b945e4dfe2327 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 Signed-off-by: Marie-Luce Signed-off-by: Martin Renvoize https://bugs.koha-community.org/show_bug.cgi?id=25508 Signed-off-by: Tomas Cohen Arazi --- 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.39.5