Lines 30-36
use t::lib::Mocks;
Link Here
|
30 |
|
30 |
|
31 |
use C4::Biblio; |
31 |
use C4::Biblio; |
32 |
use C4::Context; |
32 |
use C4::Context; |
|
|
33 |
|
34 |
use Koha::Biblio::Metadatas; |
33 |
use Koha::Database; |
35 |
use Koha::Database; |
|
|
36 |
use Koha::DateUtils; |
34 |
|
37 |
|
35 |
BEGIN { |
38 |
BEGIN { |
36 |
use_ok('Koha::OAI::Server::DeletedRecord'); |
39 |
use_ok('Koha::OAI::Server::DeletedRecord'); |
Lines 344-357
subtest 'Bug 19725: OAI-PMH ListRecords and ListIdentifiers should use biblio_me
Link Here
|
344 |
# Wait 1 second to be sure no timestamp will be equal to $from defined below |
347 |
# Wait 1 second to be sure no timestamp will be equal to $from defined below |
345 |
sleep 1; |
348 |
sleep 1; |
346 |
|
349 |
|
347 |
my $from_dt = DateTime->now; |
|
|
348 |
my $from = $from_dt->ymd . 'T' . $from_dt->hms . 'Z'; |
349 |
|
350 |
# Modify record to trigger auto update of timestamp |
350 |
# Modify record to trigger auto update of timestamp |
351 |
(my $biblionumber = $marcxml[0]->{header}->{identifier}) =~ s/^.*:(.*)/$1/; |
351 |
(my $biblionumber = $marcxml[0]->{header}->{identifier}) =~ s/^.*:(.*)/$1/; |
352 |
my $record = GetMarcBiblio({biblionumber => $biblionumber}); |
352 |
my $record = GetMarcBiblio({biblionumber => $biblionumber}); |
353 |
$record->append_fields(MARC::Field->new(999, '', '', z => '_')); |
353 |
$record->append_fields(MARC::Field->new(999, '', '', z => '_')); |
354 |
ModBiblio($record, $biblionumber); |
354 |
ModBiblio( $record, $biblionumber ); |
|
|
355 |
my $from_dt = dt_from_string( |
356 |
Koha::Biblio::Metadatas->search({ biblionumber => $biblionumber }) |
357 |
->next->timestamp ); |
358 |
my $from = $from_dt->ymd . 'T' . $from_dt->hms . 'Z'; |
355 |
$oaidc[0]->{header}->{datestamp} = $from; |
359 |
$oaidc[0]->{header}->{datestamp} = $from; |
356 |
|
360 |
|
357 |
test_query( |
361 |
test_query( |
358 |
- |
|
|