Bugzilla – Attachment 156283 Details for
Bug 34930
Fix timezone problem in Koha/Object.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34930: Change timezone in Koha/Object.t where tests assume it
Bug-34930-Change-timezone-in-KohaObjectt-where-tes.patch (text/plain), 1.41 KB, created by
Marcel de Rooy
on 2023-09-27 12:03:36 UTC
(
hide
)
Description:
Bug 34930: Change timezone in Koha/Object.t where tests assume it
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-27 12:03:36 UTC
Size:
1.41 KB
patch
obsolete
>From 64355ce061c8a3a3d0390b994ff678a35078b132 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 27 Sep 2023 13:57:49 +0200 >Subject: [PATCH] Bug 34930: Change timezone in Koha/Object.t where tests > assume it >Content-Type: text/plain; charset=utf-8 > >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> >--- > t/db_dependent/Koha/Object.t | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t >index c1b0b379d3..056dbbdfbc 100755 >--- a/t/db_dependent/Koha/Object.t >+++ b/t/db_dependent/Koha/Object.t >@@ -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 { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34930
:
156283
|
156384