Bug 29363: Fix TestBuilder.t if bib 123 does not exist

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-10-29 09:59:29 +02:00
parent 20078affb9
commit 42d1bc3d49

View file

@ -278,7 +278,7 @@ subtest 'Tests for delete method' => sub {
# Test delete in table without primary key (..)
is( $schema->source('TmpHoldsqueue')->primary_columns, 0,
'Table without primary key detected' );
my $bibno = 123; # just a number
my $bibno = $builder->build_sample_biblio->biblionumber;
my $cnt1 = $schema->resultset('TmpHoldsqueue')->count;
# Insert a new record in TmpHoldsqueue with that biblionumber
my $val = { biblionumber => $bibno };