Bugzilla – Attachment 166512 Details for
Bug 36486
Add tests for Koha::DateTime::Format::SQL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36486: Fix file perms and tidiness
Bug-36486-Fix-file-perms-and-tidiness.patch (text/plain), 3.65 KB, created by
Marcel de Rooy
on 2024-05-10 08:45:03 UTC
(
hide
)
Description:
Bug 36486: Fix file perms and tidiness
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-05-10 08:45:03 UTC
Size:
3.65 KB
patch
obsolete
>From 97a65e221cb9940a32a3b4a63fc6d762d564733b Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 10 May 2024 10:29:13 +0200 >Subject: [PATCH] Bug 36486: Fix file perms and tidiness >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/Koha/DateTime/Format/SQL.t | 54 ++++++++++++++++++------------------ > 1 file changed, 27 insertions(+), 27 deletions(-) > mode change 100644 => 100755 t/Koha/DateTime/Format/SQL.t > >diff --git a/t/Koha/DateTime/Format/SQL.t b/t/Koha/DateTime/Format/SQL.t >old mode 100644 >new mode 100755 >index 8ae3f09c54..9e3003c398 >--- a/t/Koha/DateTime/Format/SQL.t >+++ b/t/Koha/DateTime/Format/SQL.t >@@ -8,10 +8,10 @@ use Test::More; > > BEGIN { use_ok('Koha::DateTime::Format::SQL'); } > >-my $local_timezone = DateTime::TimeZone->new( name => 'local' ); >+my $local_timezone = DateTime::TimeZone->new( name => 'local' ); > my $koha_config_mock = Test::MockModule->new('Koha::Config'); >-my $config = { timezone => '' }; >-$koha_config_mock->mock('get', sub { $config->{$_[1]} }); >+my $config = { timezone => '' }; >+$koha_config_mock->mock( 'get', sub { $config->{ $_[1] } } ); > > subtest 'normal datetime, no timezone configured' => sub { > plan tests => 7; >@@ -21,12 +21,12 @@ subtest 'normal datetime, no timezone configured' => sub { > > my $dt = Koha::DateTime::Format::SQL->parse_datetime('2024-01-02 10:11:12'); > >- is( $dt->year, 2024 ); >- is( $dt->month, 1 ); >- is( $dt->day, 2 ); >- is( $dt->hour, 10 ); >- is( $dt->minute, 11 ); >- is( $dt->second, 12 ); >+ is( $dt->year, 2024 ); >+ is( $dt->month, 1 ); >+ is( $dt->day, 2 ); >+ is( $dt->hour, 10 ); >+ is( $dt->minute, 11 ); >+ is( $dt->second, 12 ); > is( $dt->time_zone->name, $local_timezone->name ); > }; > >@@ -38,12 +38,12 @@ subtest 'normal datetime, with timezone configured' => sub { > > my $dt = Koha::DateTime::Format::SQL->parse_datetime('2024-01-02 10:11:12'); > >- is( $dt->year, 2024 ); >- is( $dt->month, 1 ); >- is( $dt->day, 2 ); >- is( $dt->hour, 10 ); >- is( $dt->minute, 11 ); >- is( $dt->second, 12 ); >+ is( $dt->year, 2024 ); >+ is( $dt->month, 1 ); >+ is( $dt->day, 2 ); >+ is( $dt->hour, 10 ); >+ is( $dt->minute, 11 ); >+ is( $dt->second, 12 ); > is( $dt->time_zone->name, 'Pacific/Auckland' ); > }; > >@@ -55,12 +55,12 @@ subtest 'infinite datetime, no timezone configured' => sub { > > my $dt = Koha::DateTime::Format::SQL->parse_datetime('9999-01-02 10:11:12'); > >- is( $dt->year, 9999 ); >- is( $dt->month, 1 ); >- is( $dt->day, 2 ); >- is( $dt->hour, 10 ); >- is( $dt->minute, 11 ); >- is( $dt->second, 12 ); >+ is( $dt->year, 9999 ); >+ is( $dt->month, 1 ); >+ is( $dt->day, 2 ); >+ is( $dt->hour, 10 ); >+ is( $dt->minute, 11 ); >+ is( $dt->second, 12 ); > is( $dt->time_zone->name, 'floating' ); > }; > >@@ -72,12 +72,12 @@ subtest 'normal datetime, with timezone configured' => sub { > > my $dt = Koha::DateTime::Format::SQL->parse_datetime('9999-01-02 10:11:12'); > >- is( $dt->year, 9999 ); >- is( $dt->month, 1 ); >- is( $dt->day, 2 ); >- is( $dt->hour, 10 ); >- is( $dt->minute, 11 ); >- is( $dt->second, 12 ); >+ is( $dt->year, 9999 ); >+ is( $dt->month, 1 ); >+ is( $dt->day, 2 ); >+ is( $dt->hour, 10 ); >+ is( $dt->minute, 11 ); >+ is( $dt->second, 12 ); > is( $dt->time_zone->name, 'floating' ); > }; > >-- >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 36486
:
164235
|
166452
|
166508
|
166511
| 166512