Bugzilla – Attachment 111521 Details for
Bug 24679
Allow to apply a MARC modification template in export tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24679: Fix exporter tests
Bug-24679-Fix-exporter-tests.patch (text/plain), 2.52 KB, created by
Julian Maurice
on 2020-10-13 08:12:29 UTC
(
hide
)
Description:
Bug 24679: Fix exporter tests
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-10-13 08:12:29 UTC
Size:
2.52 KB
patch
obsolete
>From 909286b1b56b97c83fccb3418fa8ba79aa621385 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24679
:
99175
|
99304
|
99700
|
111519
|
111520
| 111521