From 71c15cf502b57ad8d149097915cded46a7042326 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Wed, 30 Sep 2020 18:09:19 +0000 Subject: [PATCH] Bug 19353: Fix tests on UNIMARC Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- t/db_dependent/OAI/Server.t | 8 ++++---- t/db_dependent/OAI/oaiconf.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t index bab84d146e..25316ceeb7 100755 --- a/t/db_dependent/OAI/Server.t +++ b/t/db_dependent/OAI/Server.t @@ -87,11 +87,11 @@ foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) { if (C4::Context->preference('marcflavour') eq 'UNIMARC') { $record->append_fields( MARC::Field->new('101', '', '', 'a' => "lng" ) ); $record->append_fields( MARC::Field->new('200', '', '', 'a' => "Title $index" ) ); - $record->append_fields( MARC::Field->new('995', '', '', 'a' => "Code" ) ); + $record->append_fields( MARC::Field->new('952', '', '', 'a' => "Code" ) ); } else { $record->append_fields( MARC::Field->new('008', ' lng' ) ); $record->append_fields( MARC::Field->new('245', '', '', 'a' => "Title $index" ) ); - $record->append_fields( MARC::Field->new('995', '', '', 'a' => "Code" ) ); + $record->append_fields( MARC::Field->new('952', '', '', 'a' => "Code" ) ); } my ($biblionumber) = AddBiblio($record, ''); my $timestamp = $base_datetime->ymd . ' ' .$base_datetime->hms; @@ -101,7 +101,7 @@ foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) { $timestamp =~ s/ /T/; $record = GetMarcBiblio({ biblionumber => $biblionumber }); my $record_transformed = $record->clone; - $record_transformed->delete_fields( $record_transformed->field('995')); + $record_transformed->delete_fields( $record_transformed->field('952')); $record_transformed = XMLin($record_transformed->as_xml_record); $record = XMLin($record->as_xml_record); push @header, { datestamp => $timestamp, identifier => "TEST:$biblionumber" }; @@ -374,7 +374,7 @@ test_query('ListRecords marcxml with xsl transformation', } }, }); -t::lib::Mocks::mock_preference("OAI-PMH:ConfFile" => undef); +t::lib::Mocks::mock_preference("OAI-PMH:ConfFile" => ''); restore_time(); diff --git a/t/db_dependent/OAI/oaiconf.yaml b/t/db_dependent/OAI/oaiconf.yaml index 251dbd35db..2f81a959bf 100644 --- a/t/db_dependent/OAI/oaiconf.yaml +++ b/t/db_dependent/OAI/oaiconf.yaml @@ -3,5 +3,5 @@ format: metadataPrefix: marxml metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd - xsl_file: koha-tmpl/intranet-tmpl/prog/en/xslt/Del995.xsl + xsl_file: koha-tmpl/intranet-tmpl/prog/en/xslt/Del952.xsl include_items: 0 -- 2.39.5