[Rt-commit] r18716 - in rt/3.999/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Thu Mar 5 19:48:44 EST 2009
Author: sartak
Date: Thu Mar 5 19:48:44 2009
New Revision: 18716
Modified:
rt/3.999/trunk/ (props changed)
rt/3.999/trunk/t/api/date.t
Log:
r80994 at onn: sartak | 2009-03-05 19:48:39 -0500
Test fixes
Modified: rt/3.999/trunk/t/api/date.t
==============================================================================
--- rt/3.999/trunk/t/api/date.t (original)
+++ rt/3.999/trunk/t/api/date.t Thu Mar 5 19:48:44 2009
@@ -4,7 +4,7 @@
use Test::MockTime qw(set_fixed_time restore_time);
use RT::Test;
-use Test::More tests => 87;
+use Test::More tests => 89;
use RT::Model::User;
use Test::Warn;
@@ -141,7 +141,9 @@
{ # set+ISO format
my $date = RT::DateTime->new_from_string('weird date');
- is($date, undef, "unparseable date returns undef");
+ isa_ok($date, 'RT::DateTime');
+ is($date, 'unset', "unparseable date returns an 'unset' RT::DateTime");
+ ok($date->is_unset, "unparseable date is_unset");
$date = RT::DateTime->new_from_string('2005-11-28 15:10:00');
is($date, '2005-11-28 15:10:00', "YYYY-DD-MM hh:mm:ss");
@@ -183,10 +185,10 @@
};
$date = RT::DateTime->new_from_string('2005-13-28 15:10:00');
- ok(!$date, "wrong month value");
+ ok($date->is_unset, "wrong month value");
$date = RT::DateTime->new_from_string('2005-00-28 15:10:00');
- ok(!$date, "wrong month value");
+ ok($date->is_unset, "wrong month value");
$date = RT::DateTime->new_from_string('1960-01-28 15:10:00');
is($date, '1960-01-28 15:10:00', "we can support pre-1970s dates now");
More information about the Rt-commit
mailing list