View | Details | Raw Unified | Return to bug 20665
Collapse All | Expand All

(-)a/t/db_dependent/OAI/Server.t (-2 / +23 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use Test::MockTime qw/set_fixed_time restore_time/;
21
use Test::MockTime qw/set_fixed_time restore_time/;
22
22
23
use Test::More tests => 29;
23
use Test::More tests => 30;
24
use DateTime;
24
use DateTime;
25
use Test::MockModule;
25
use Test::MockModule;
26
use Test::Warn;
26
use Test::Warn;
Lines 376-379 subtest 'Bug 19725: OAI-PMH ListRecords and ListIdentifiers should use biblio_me Link Here
376
    });
376
    });
377
};
377
};
378
378
379
subtest 'Bug 20665: OAI-PMH Provider should reset the MySQL connection time zone' => sub {
380
    plan tests => 2;
381
382
    # Set time zone to SYSTEM so that it can be checked later
383
    $dbh->do("SET time_zone='SYSTEM'");
384
385
386
    test_query('ListIdentifiers without metadataPrefix', {verb => 'ListIdentifiers'}, {
387
        error => {
388
            code => 'badArgument',
389
            content => "Required argument 'metadataPrefix' was undefined",
390
        },
391
    });
392
393
    my $sth = C4::Context->dbh->prepare('SELECT @@session.time_zone');
394
    $sth->execute();
395
    my ( $tz ) = $sth->fetchrow();
396
397
    ok ( $tz eq 'SYSTEM', 'MySQL connection time zone is SYSTEM' );
398
};
399
400
379
$schema->storage->txn_rollback;
401
$schema->storage->txn_rollback;
380
- 

Return to bug 20665