X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F68inflate.t;h=0ce901cfcc2f381d5f8bd9a1a8f7ffc1301e6130;hb=a0f1c4de9f4896f8d4ab8d7f3b23a57411f35bfd;hp=b73025380234882ea4aea943ef9efcd76f642469;hpb=a47e123334d8bcea0d34dc9ea09738d6f3b1fd49;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/68inflate.t b/t/68inflate.t index b730253..0ce901c 100644 --- a/t/68inflate.t +++ b/t/68inflate.t @@ -5,12 +5,13 @@ use Test::More; use lib qw(t/lib); use DBICTest; +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