X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi-t%2Fcolumns_as_hashes.t;h=24dbc2a6dd06897e440a378fc4f54a135d5a8716;hb=1c779eb2212fac3c44e615418c2b516e18cbc5e2;hp=70f887e3fb93a8be5e519930f48a8e30ec7e9dad;hpb=d656262b3d0469fc3216a67d3b9fb070110632bd;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi-t/columns_as_hashes.t b/t/cdbi-t/columns_as_hashes.t index 70f887e..24dbc2a 100644 --- a/t/cdbi-t/columns_as_hashes.t +++ b/t/cdbi-t/columns_as_hashes.t @@ -87,4 +87,19 @@ warning_is { ok !eval { $actor->film }; is $actor->{film}->id, $waves->id, 'hash access still works despite lack of accessor'; +} + + +# Emulate that Class::DBI inflates immediately +{ + require_ok 'MyFoo'; + + my $foo = MyFoo->insert({ + name => 'Whatever', + tdate => '1949-02-01', + }); + isa_ok $foo, 'MyFoo'; + + isa_ok $foo->{tdate}, 'Date::Simple'; + is $foo->{tdate}->year, 1949; } \ No newline at end of file