[Jifty-commit] r2800 - in Jifty-DBI/trunk: t
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Feb 18 10:06:21 EST 2007
Author: sterling
Date: Sun Feb 18 10:06:20 2007
New Revision: 2800
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/t/06filter_datetime.t
Log:
added Makefile.old to svn:ignore
Modified: Jifty-DBI/trunk/t/06filter_datetime.t
==============================================================================
--- Jifty-DBI/trunk/t/06filter_datetime.t (original)
+++ Jifty-DBI/trunk/t/06filter_datetime.t Sun Feb 18 10:06:20 2007
@@ -6,7 +6,7 @@
BEGIN { require "t/utils.pl" }
our (@available_drivers);
-use constant TESTS_PER_DRIVER => 16;
+use constant TESTS_PER_DRIVER => 18;
my $total = scalar(@available_drivers) * TESTS_PER_DRIVER;
plan tests => $total;
@@ -53,6 +53,11 @@
$rec->set_created;
is($rec->created, undef, "Set undef value" );
+ # Create using default undef
+ my $rec2 = TestApp::User->new( handle => $handle );
+ isa_ok($rec2, 'Jifty::DBI::Record');
+ is($rec2->created, undef, 'Default of undef');
+
# from string
require POSIX;
$rec->set_created( POSIX::strftime( "%Y-%m-%d %H:%M:%S", gmtime($now) ) );
@@ -111,18 +116,21 @@
BEGIN {
use Jifty::DBI::Schema;
+ use Scalar::Defer qw/ defer /;
+
use Jifty::DBI::Record schema {
column created =>
type is 'datetime',
- input_filters are qw/Jifty::DBI::Filter::DateTime/;
+ filters are qw/Jifty::DBI::Filter::DateTime/,
+ default is undef;
column event_on =>
type is 'date',
- input_filters are qw/Jifty::DBI::Filter::Date/;
+ filters are qw/Jifty::DBI::Filter::Date/;
column event_stops =>
type is 'time',
- input_filters are qw/Jifty::DBI::Filter::Time/;
+ filters are qw/Jifty::DBI::Filter::Time/;
}
}
More information about the Jifty-commit
mailing list