Bugzilla – Attachment 118315 Details for
Bug 27937
Date of birth entered without correct format causes internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27937: Unit test
Bug-27937-Unit-test.patch (text/plain), 1.17 KB, created by
Nick Clemens (kidclamp)
on 2021-03-16 12:59:54 UTC
(
hide
)
Description:
Bug 27937: Unit test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-03-16 12:59:54 UTC
Size:
1.17 KB
patch
obsolete
>From 8cfd6bb6035d3df21a187497500b8c27e22a46b3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 16 Mar 2021 12:53:50 +0000 >Subject: [PATCH] Bug 27937: Unit test > >--- > t/DateUtils.t | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/t/DateUtils.t b/t/DateUtils.t >index 5b00c77124..2a5f010dbd 100755 >--- a/t/DateUtils.t >+++ b/t/DateUtils.t >@@ -4,7 +4,7 @@ use DateTime::TimeZone; > > use C4::Context; > >-use Test::More tests => 79; >+use Test::More tests => 81; > > use Test::MockModule; > use Test::Warn; >@@ -22,8 +22,13 @@ my $tz = C4::Context->tz; > > isa_ok( $tz, 'DateTime::TimeZone', 'Context returns timezone object' ); > >-my $testdate_iso = '2011-06-16'; # Bloomsday 2011 >+my $testdate_iso = '2011-6-16'; > my $dt = dt_from_string( $testdate_iso, 'iso' ); >+isa_ok( $dt, 'DateTime', 'dt_from_string returns a DateTime object' ); >+cmp_ok( $dt->ymd(), 'eq', '2011-06-16', 'Returned object is standardized to 2 digit day' ); >+ >+$testdate_iso = '2011-06-16'; # Bloomsday 2011 >+$dt = dt_from_string( $testdate_iso, 'iso' ); > > isa_ok( $dt, 'DateTime', 'dt_from_string returns a DateTime object' ); > >-- >2.11.0
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 27937
:
118315
|
118316
|
118317
|
118368
|
119069
|
119070
|
119084