projects
/
dbsrgits/DBIx-Class.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added failing tests for inflate_column
[dbsrgits/DBIx-Class.git]
/
t
/
08inflate.t
1
use Test::More;
2
3
plan tests => 4;
4
5
use lib qw(t/lib);
6
7
use_ok('DBICTest');
8
9
# inflation test
10
my $cd = DBICTest::CD->retrieve(3);
11
is( ref($cd->year), 'DateTime', 'year is a DateTime, ok' );
12
13
is( $cd->year->month, 1, 'inflated month ok' );
14
15
# deflate test
16
$cd->year( 2005 );
17
$cd->update;
18
19
($cd) = DBICTest::CD->search( year => 2005 );
20
is( $cd->year, 2005, 'deflate ok' );