Bug 34930: Change timezone in Koha/Object.t where tests assume it
This is the case for subtest: attributes_from_api() tests.
Test plan:
export TZ='Europe/Amsterdam'
prove t/db_dependent/Koha/Object.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fb84e424e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
f2228f40ab
commit
69ce926ff2
|
|
@ -691,6 +691,10 @@ subtest 'attributes_from_api() tests' => sub {
|
|||
|
||||
my $patron = Koha::Patron->new();
|
||||
|
||||
delete $C4::Context::context->{tz};
|
||||
local %ENV;
|
||||
$ENV{TZ} = 'Etc/UTC'; # following tests implicitly assume it
|
||||
|
||||
my $attrs = $patron->attributes_from_api(
|
||||
{
|
||||
updated_on => '2019-12-27T14:53:00Z',
|
||||
|
|
@ -762,6 +766,9 @@ subtest 'attributes_from_api() tests' => sub {
|
|||
'date_of_birth',
|
||||
'Exception parameter is the API field name, not the DB one'
|
||||
);
|
||||
|
||||
# Remove timezone change
|
||||
delete $C4::Context::context->{tz};
|
||||
};
|
||||
|
||||
subtest 'booleans handling tests' => sub {
|
||||
|
|
|
|||
Loading…
Reference in New Issue