From 9cb97c04e77bc6099eb9d6b7b3bd4aefed93f9b5 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 16 Dec 2016 10:17:37 +0100 Subject: [PATCH] Bug 15108: [QA Follow-up] Changes from removing collection wrapper Content-Type: text/plain; charset=utf-8 See bug 17744. --- t/db_dependent/OAI/Server.t | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t index 76a142f..0caf114 100644 --- a/t/db_dependent/OAI/Server.t +++ b/t/db_dependent/OAI/Server.t @@ -81,38 +81,24 @@ foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) { $record = GetMarcBiblio($biblionumber); $record = XMLin($record->as_xml_record); push @header, { datestamp => $timestamp, identifier => "TEST:$biblionumber" }; - delete $record->{$_} for (('xmlns','xmlns:xsi','xsi:schemaLocation')); push @oaidc, { header => $header[$index], metadata => { - 'oai_dc:dcCollection' => { - 'oai_dc:dc' => { - 'dc:title' => { - 'content' => "Title $index", - 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/' - }, - 'dc:language' => { - 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/' - }, - 'dc:type' => { - 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/' - }, - }, - "xmlns:oai_dc" => "http://www.openarchives.org/OAI/2.0/oai_dc/", - "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance", - "xsi:schemaLocation" => "http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd", + 'oai_dc:dc' => { + 'dc:title' => "Title $index", + 'dc:language' => {}, + 'dc:type' => {}, + 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'xmlns:oai_dc' => 'http://www.openarchives.org/OAI/2.0/oai_dc/', + 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/', + 'xsi:schemaLocation' => 'http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd', }, }, }; push @marcxml, { header => $header[$index], metadata => { - collection => { - record => $record, - "xmlns" => "http://www.loc.gov/MARC21/slim", - "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance", - "xsi:schemaLocation" => "http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd", - }, + record => $record, }, }; } @@ -136,10 +122,10 @@ sub test_query { my %full_expected = ( %$expected, ( - request => 'http://localhost', + request => 'http://localhost', responseDate => DateTime->now . 'Z', - xmlns => 'http://www.openarchives.org/OAI/2.0/', - 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + xmlns => 'http://www.openarchives.org/OAI/2.0/', + 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:schemaLocation' => 'http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd', ) ); @@ -221,7 +207,6 @@ test_query( cursor => 6, }, }, - }, ); @@ -236,7 +221,6 @@ test_query( cursor => 9, }, }, - }, ); @@ -247,7 +231,6 @@ test_query( ListIdentifiers => { header => $header[9], }, - }, ); -- 2.1.4