Bugzilla – Attachment 129391 Details for
Bug 29403
dt_from_string should fail if passed more data than expected for the format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29403: Unit tests
Bug-29403-Unit-tests.patch (text/plain), 1.43 KB, created by
Martin Renvoize (ashimema)
on 2022-01-13 09:30:23 UTC
(
hide
)
Description:
Bug 29403: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-01-13 09:30:23 UTC
Size:
1.43 KB
patch
obsolete
>From fc07e06b105bdd982d5be992920e49a43b499506 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 3 Nov 2021 12:14:50 +0000 >Subject: [PATCH] Bug 29403: Unit tests > >Add a unit test for proper iso date handling > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/DateUtils.t | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/t/DateUtils.t b/t/DateUtils.t >index 7cfa982187..f81be71012 100755 >--- a/t/DateUtils.t >+++ b/t/DateUtils.t >@@ -4,7 +4,7 @@ use DateTime::TimeZone; > > use C4::Context; > >-use Test::More tests => 80; >+use Test::More tests => 81; > > use Test::MockModule; > use Test::Warn; >@@ -140,7 +140,12 @@ cmp_ok( $dt0->epoch(), 'eq', '1325455199', 'dt_from_string handles seconds with > eval { > $dt0 = dt_from_string( '2012-01-01T23:59:59.999Z+02:00', 'rfc3339' ); > }; >-like( $@, qr/.*does not match the date format \(rfc3339\).*/, 'dt_from_string should die when passed a bad date string' ); >+like( $@, qr/.*does not match the date format \(rfc3339\).*/, 'dt_from_string should die when passed a bad rfc3339 date string' ); >+ >+eval { >+ $dt0 = dt_from_string('2021-11-03T10:16:59+00:00', 'iso'); >+}; >+like( $@, qr/.*does not match the date format \(iso\).*/, 'dt_from_string should die when passed a bad iso date string' ); > > # ISO string tests > subtest 'dt_from_string - iso format' => sub { >-- >2.20.1
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 29403
:
127246
|
127247
|
127254
|
128076
|
128077
|
128078
|
128272
|
128273
|
128274
|
128450
|
128451
|
128452
|
128825
|
128826
|
128827
|
128828
|
128829
|
129373
|
129374
|
129375
|
129376
|
129391
|
129392
|
129393
|
129394
|
129473
|
129486
|
129487
|
129488
|
129552
|
129553
|
129554
|
129555
|
129556