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>
This commit is contained in:
parent
6109a41ca6
commit
0fb84e424e
|
|
@ -690,6 +690,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',
|
||||
|
|
@ -761,6 +765,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