[Rt-commit] r18660 - in rt/3.999/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Wed Mar 4 16:11:32 EST 2009
Author: sartak
Date: Wed Mar 4 16:11:32 2009
New Revision: 18660
Modified:
rt/3.999/trunk/ (props changed)
rt/3.999/trunk/t/api/date.t
Log:
r80895 at onn: sartak | 2009-03-04 16:11:24 -0500
Now that we have strftime there's little reason to have all this variation in format methods
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 Wed Mar 4 16:11:32 2009
@@ -93,52 +93,9 @@
{
my $date = RT::DateTime->now(current_user => RT->system_user);
is($date, '2005-11-28 15:10:00', "default is ISO format");
-
is($date->rfc2822,
- 'Mon, 28 Nov 2005 15:10:00 -0000',
+ 'Mon, 28 Nov 2005 15:10:00 +0000',
"RFC2822 format with defaults");
-
- is($date->iso(time => 0),
- '2005-11-28',
- "ISO format without time part");
-
- TODO: {
- local $TODO = "time => 0 not supported for DateTime::Format methods";
- is($date->rfc2822(time => 0),
- 'Mon, 28 Nov 2005',
- "RFC2822 format without time part");
- };
-
- is($date->iso(date => 0),
- '15:10:00',
- "ISO format without date part");
-
- TODO: {
- local $TODO = "date => 0 not supported for rfc2822";
- is($date->rfc2822(date => 0),
- '15:10:00 -0000',
- "RFC2822 format without date part");
- };
-
- TODO: {
- local $TODO = "seconds => 0 not supported for format methods";
- is($date->iso(date => 0, seconds => 0),
- '15:10',
- "ISO format without date part and seconds");
- is($date->rfc2822(date => 0, seconds => 0),
- '15:10 -0000',
- "RFC2822 format without date part and seconds");
- };
-
- TODO: {
- local $TODO = "day_of_week => 0 not supported for format methods";
- is($date->rfc2822(day_of_week => 0),
- '28 Nov 2005 15:10:00 -0000',
- "RFC2822 format without 'day of week' part");
- is($date->rfc2822(day_of_week => 0, date => 0),
- '15:10:00 -0000',
- "RFC2822 format without 'day of week' and date parts(corner case test)");
- };
}
More information about the Rt-commit
mailing list