X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F68inflate.t;h=0ce901cfcc2f381d5f8bd9a1a8f7ffc1301e6130;hb=0ffbc9ec4cc37ae5fd868d32b545ed2e853f19da;hp=3906a0247227a32e3e90bbdfff1e4bdb8209b3a9;hpb=d6915f449e2d68ac184d6bc616043fd605913757;p=dbsrgits%2FDBIx-Class.git diff --git a/t/68inflate.t b/t/68inflate.t index 3906a02..0ce901c 100644 --- a/t/68inflate.t +++ b/t/68inflate.t @@ -5,12 +5,13 @@ use Test::More; use lib qw(t/lib); use DBICTest; -my $schema = DBICTest::init_schema(); +DBICTest::Schema::CD->add_column('year'); +my $schema = DBICTest->init_schema(); eval { require DateTime }; plan skip_all => "Need DateTime for inflation tests" if $@; -plan tests => 3; +plan tests => 4; DBICTest::Schema::CD->inflate_column( 'year', { inflate => sub { DateTime->new( year => shift ) }, @@ -23,6 +24,8 @@ my $cd = $schema->resultset("CD")->find(3); is( ref($cd->year), 'DateTime', 'year is a DateTime, ok' ); +is( $cd->year->year, 1997, 'inflated year ok' ); + is( $cd->year->month, 1, 'inflated month ok' ); # deflate test