From: Andy Grundman Date: Tue, 2 Aug 2005 02:10:50 +0000 (+0000) Subject: Changed deflate test to work with a real object X-Git-Tag: v0.03001~102 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cabca325bdff21daf9a2c4233bece20c0d97fbf6;p=dbsrgits%2FDBIx-Class.git Changed deflate test to work with a real object --- diff --git a/t/08inflate.t b/t/08inflate.t index 5b5122a..0ba91e8 100644 --- a/t/08inflate.t +++ b/t/08inflate.t @@ -1,4 +1,5 @@ use Test::More; +use DateTime; plan tests => 4; @@ -13,8 +14,9 @@ is( ref($cd->year), 'DateTime', 'year is a DateTime, ok' ); is( $cd->year->month, 1, 'inflated month ok' ); # deflate test -$cd->year( 2005 ); +my $now = DateTime->now; +$cd->year( $now ); $cd->update; -($cd) = DBICTest::CD->search( year => 2005 ); -is( $cd->year, 2005, 'deflate ok' ); +($cd) = DBICTest::CD->search( year => $now->year ); +is( $cd->year, $now->year, 'deflate ok' );