From 909286b1b56b97c83fccb3418fa8ba79aa621385 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 13 Oct 2020 10:11:01 +0200 Subject: [PATCH] Bug 24679: Fix exporter tests Use 998 instead of 999 which is used in MARC21 to store biblionumber --- t/db_dependent/Exporter/Record.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Exporter/Record.t b/t/db_dependent/Exporter/Record.t index fb3ef27f18..68fa28debd 100755 --- a/t/db_dependent/Exporter/Record.t +++ b/t/db_dependent/Exporter/Record.t @@ -444,7 +444,7 @@ subtest 'export xml with marc modification template' => sub { plan tests => 2; my $template_id = C4::MarcModificationTemplates::AddModificationTemplate('test exporter'); - C4::MarcModificationTemplates::AddModificationTemplateAction($template_id, 'add_field', 0, '999', '9', 'Foobar'); + C4::MarcModificationTemplates::AddModificationTemplateAction($template_id, 'add_field', 0, '998', '9', 'Foobar'); my $generated_xml_file = '/tmp/test_export.xml'; Koha::Exporter::Record::export({ @@ -465,14 +465,14 @@ subtest 'export xml with marc modification template' => sub { } is( scalar( @records ), 1, 'Export XML: 1 record should have been exported' ); my $record = $records[0]; - is( $record->subfield('999', '9'), 'Foobar', 'Export XML: marc modification template should have added 999$9' ); + is( $record->subfield('998', '9'), 'Foobar', 'Export XML: marc modification template should have added 998$9' ); }; subtest 'export iso2709 with marc modification template' => sub { plan tests => 2; my $template_id = C4::MarcModificationTemplates::AddModificationTemplate('test exporter'); - C4::MarcModificationTemplates::AddModificationTemplateAction($template_id, 'add_field', 0, '999', '9', 'Foobar'); + C4::MarcModificationTemplates::AddModificationTemplateAction($template_id, 'add_field', 0, '998', '9', 'Foobar'); my $generated_mrc_file = '/tmp/test_export.mrc'; Koha::Exporter::Record::export({ @@ -490,7 +490,7 @@ subtest 'export iso2709 with marc modification template' => sub { } is( scalar( @records ), 1, 'Export ISO2709: 1 record should have been exported' ); my $record = $records[0]; - is( $record->subfield('999', '9'), 'Foobar', 'Export ISO2709: marc modification template should have added 999$9' ); + is( $record->subfield('998', '9'), 'Foobar', 'Export ISO2709: marc modification template should have added 998$9' ); }; $schema->storage->txn_rollback; -- 2.20.1