X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F68inflate_resultclass_hashrefinflator.t;h=214e11a37b74621eb258b76e9383d87cbe904ebf;hb=e0b438fbf183279ad1dc824d52ead5102bf3cb20;hp=a0402a127c958056015d305df7397ddab0f0c010;hpb=4613ee1e805f722e186dff43738ab63603890b87;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/68inflate_resultclass_hashrefinflator.t b/t/68inflate_resultclass_hashrefinflator.t index a0402a1..214e11a 100644 --- a/t/68inflate_resultclass_hashrefinflator.t +++ b/t/68inflate_resultclass_hashrefinflator.t @@ -3,8 +3,6 @@ use warnings; use Test::More qw(no_plan); use lib qw(t/lib); -use Scalar::Util qw/blessed/; -use DateTime; use DBICTest; use DBIx::Class::ResultClass::HashRefInflator; my $schema = DBICTest->init_schema(); @@ -117,17 +115,3 @@ for my $index (0 .. $#hashrefinf) { is ($track->get_column ($col), $datahashref->{cds}{tracks}{$col}, "Correct track '$col'"); } } - -# Test the data inflator - -$schema->class('CD')->inflate_column( 'year', - { inflate => sub { DateTime->new( year => shift ) }, - deflate => sub { shift->year } } -); - -my $cd_rs = $schema->resultset("CD")->search ({cdid => 3}); -$cd_rs->result_class('DBIx::Class::ResultClass::HashRefInflator'); - -my $cd = $cd_rs->first; -ok ( (not blessed $cd->{year}), "Plain string returned for year"); -is ( $cd->{year}, '1997', "We are looking at the right year");