Bugzilla – Attachment 84393 Details for
Bug 19816
output_pref must implement 'dateonly' for dateformat => rfc3339
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19816: Regression tests
Bug-19816-Regression-tests.patch (text/plain), 1.43 KB, created by
Josef Moravec
on 2019-01-25 07:50:32 UTC
(
hide
)
Description:
Bug 19816: Regression tests
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-01-25 07:50:32 UTC
Size:
1.43 KB
patch
obsolete
>From b3f7e53efc9a2d9d6e093f6b52d453a30c3ca650 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 24 Jan 2019 14:27:28 -0300 >Subject: [PATCH] Bug 19816: Regression tests > >This patch adds tests for the rfc3339 behaviour when dateonly => 1. > >To test: >- Run: > $ kshell > k$ prove t/DateUtils.t >=> SUCCESS: Tests pass >- Apply this patch >- Run: > k$ prove t/DateUtils.t >=> FAIL: dateonly is not implemented > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > t/DateUtils.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/DateUtils.t b/t/DateUtils.t >index b0c8b054ec..02ed2342b6 100755 >--- a/t/DateUtils.t >+++ b/t/DateUtils.t >@@ -4,7 +4,7 @@ use DateTime::TimeZone; > > use C4::Context; > >-use Test::More tests => 67; >+use Test::More tests => 68; > > use Test::MockModule; > use Test::Warn; >@@ -49,6 +49,9 @@ cmp_ok $date_string, 'eq', '2011-06-16 12:00 PM', 'iso output 12hr'; > $date_string = output_pref({ dt => $dt, dateformat => 'rfc3339' }); > like($date_string, qr/2011-06-16T12:00:00\+|-\d\d:\d\d/, 'RFC3339 output'); > >+$date_string = output_pref({ dt => $dt, dateformat => 'rfc3339', dateonly => 1 }); >+is($date_string, '2011-06-16', 'RFC3339 output'); >+ > # "notime" doesn't actually mean anything in this context, but we > # can't pass undef or output_pref will try to access the database > $date_string = output_pref({ dt => $dt, dateformat => 'iso', timeformat => 'notime', dateonly => 1 }); >-- >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 19816
:
84372
|
84373
|
84393
|
84394
|
84586
|
84587