Bug 22690: (QA follow-up) Make bib-level hold object actually bib-level

We need to pass undef itemnumber to build_object() to actually have a
hold without an item tied to it. Otherwise build_object() will create
automatically an item for us (thus making it an item-level hold)

To test:
 $ prove t/db_dependent/Koha/Item.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Joonas Kylmälä 2021-05-28 13:57:53 +03:00 committed by Jonathan Druart
parent 2ca69b49af
commit 34224b8141

View file

@ -927,6 +927,7 @@ subtest 'move_to_biblio() tests' => sub {
class => 'Koha::Holds',
value => {
biblionumber => $source_biblionumber,
itemnumber => undef,
},
});
my $item_level_hold1 = $builder->build_object({