Bug 19040: Refactor GetMarcBiblio parameters
[srvgit] / t / db_dependent / OAI / Server.t
index 1aa7fc1..951d7b0 100644 (file)
@@ -86,7 +86,7 @@ foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) {
     my $timestamp = $sth->fetchrow_array . 'Z';
     $timestamp =~ s/ /T/;
     $timestamp = manipulate_timestamp( $index, $biblionumber, $timestamp );
-    $record = GetMarcBiblio($biblionumber);
+    $record = GetMarcBiblio({ biblionumber => $biblionumber });
     $record = XMLin($record->as_xml_record);
     push @header, { datestamp => $timestamp, identifier => "TEST:$biblionumber" };
     push @oaidc, {
@@ -131,7 +131,6 @@ sub test_query {
         %$expected,
         (
             request      => 'http://localhost',
-            responseDate => DateTime->now . 'Z',
             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',
@@ -147,6 +146,7 @@ sub test_query {
         $response = XMLin($stdout);
     }
 
+    delete $response->{responseDate};
     unless (is_deeply($response, \%full_expected, $test)) {
         diag
             "PARAM:" . Dump($param) .