4 #----------------------------------------------------------------------
5 # Make sure subclasses can be themselves subclassed
6 #----------------------------------------------------------------------
9 eval "use DBIx::Class::CDBICompat;";
11 plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required');
17 use lib 't/cdbi/testlib';
20 INIT { @Film::Threat::ISA = qw/Film/; }
22 ok(Film::Threat->db_Main->ping, 'subclass db_Main()');
23 is_deeply [ sort Film::Threat->columns ], [ sort Film->columns ],
24 'has the same columns';
26 my $bt = Film->create_test_film;
27 ok my $btaste = Film::Threat->retrieve('Bad Taste'), "subclass retrieve";
28 isa_ok $btaste => "Film::Threat";
29 isa_ok $btaste => "Film";
30 is $btaste->Title, 'Bad Taste', 'subclass get()';