Bugzilla – Attachment 34981 Details for
Bug 11120
The date option for the overdue_notices cronjob is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11120: Should this test fail?
Bug-11120-Should-this-test-fail.patch (text/plain), 1.15 KB, created by
Jonathan Druart
on 2015-01-06 13:48:12 UTC
(
hide
)
Description:
Bug 11120: Should this test fail?
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-01-06 13:48:12 UTC
Size:
1.15 KB
patch
obsolete
>From af0d547498287f9706123228a494e588c02bd114 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 6 Jan 2015 14:47:05 +0100 >Subject: [PATCH] Bug 11120: Should this test fail? > >--- > t/DateUtils.t | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > >diff --git a/t/DateUtils.t b/t/DateUtils.t >index 6030e68..c66c705 100755 >--- a/t/DateUtils.t >+++ b/t/DateUtils.t >@@ -3,7 +3,7 @@ use DateTime; > use DateTime::TimeZone; > > use C4::Context; >-use Test::More tests => 42; >+use Test::More tests => 45; > use Test::MockModule; > use Time::HiRes qw/ gettimeofday /; > >@@ -162,3 +162,19 @@ cmp_ok $date_string, 'eq', '12/11/2013 06:35 PM', 'as_due_date with hours and ti > > my $now = DateTime->now; > is( dt_from_string, $now, "Without parameter, dt_from_string should return today" ); >+ >+# Test dt_from_string >+ >+$module_context->mock( >+ 'preference', >+ sub { >+ return 'metric'; >+ } >+); >+ >+$dt = dt_from_string( '31/01/2015' ); >+is( ref($dt), 'DateTime' ); >+$dt = eval { dt_from_string( '31/01/2015', 'iso' ); }; >+is( ref($dt), '' ); >+$dt = eval { dt_from_string( '01/01/2015', 'iso' ); }; >+is( ref($dt), '' ); >-- >2.1.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 11120
:
22304
|
29465
|
33929
|
34952
|
34953
|
34962
|
34963
|
34979
|
34980
|
34981
|
36282
|
36283
|
36284