From a3c0b6f060e7529f2704e4dd818a2efbe9dd8830 Mon Sep 17 00:00:00 2001 From: David Gustafsson Date: Thu, 22 Jul 2021 16:22:58 +0200 Subject: [PATCH] Bug 20551: Fix tests Signed-off-by: Frank Hansen Works fine for me. Signing off --- t/db_dependent/Exporter/Record.t | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/Exporter/Record.t b/t/db_dependent/Exporter/Record.t index 44f90278971..fbf4227705c 100755 --- a/t/db_dependent/Exporter/Record.t +++ b/t/db_dependent/Exporter/Record.t @@ -28,7 +28,7 @@ use MARC::Batch; use File::Slurp; use Encode; -use C4::Biblio qw( AddBiblio ); +use C4::Biblio qw( AddBiblio DelBiblio ); use C4::Context; use Koha::Database; use Koha::Biblio; @@ -204,8 +204,9 @@ subtest 'export xml' => sub { my $deleted_record = $records[2]; - # Leader has the expected value (and record status "d") - is( $deleted_record->leader, '00136dam a22000617a 4500', 'Deleted record has the correct leader value' ); + # Leader has the expected value (and record status "d", length may have + # changed) + ok( $deleted_record->leader =~ '\d{5}dam a22000617a 4500', 'Deleted record has the expected leader value' ); }; subtest 'export iso2709' => sub { @@ -239,8 +240,9 @@ subtest 'export iso2709' => sub { my $deleted_record = $records[2]; - # Leader has the expected value (and record status "d") - is( $deleted_record->leader, '00136dam a22000617a 4500', 'Deleted record has the correct leader value' ); + # Leader has the expected value (and record status "d", length may have + # changed) + ok( $deleted_record->leader =~ '\d{5}dam a22000617a 4500', 'Deleted record has the expected leader value' ); }; subtest 'export without record_type' => sub { -- 2.39.5