Make UTF-8 columns work under Perl <= 5.8.0
[dbsrgits/DBIx-Class.git] / t / 68inflate.t
index b730253..0ce901c 100644 (file)
@@ -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