PATH may be unset entirely
[dbsrgits/DBIx-Class.git] / t / cdbi / 03-subclassing.t
CommitLineData
510ca912 1use strict;
4a233f30 2use warnings;
3
510ca912 4use Test::More;
5
6#----------------------------------------------------------------------
7# Make sure subclasses can be themselves subclassed
8#----------------------------------------------------------------------
9
50891152 10use lib 't/cdbi/testlib';
510ca912 11use Film;
12
13INIT { @Film::Threat::ISA = qw/Film/; }
14
15ok(Film::Threat->db_Main->ping, 'subclass db_Main()');
16is_deeply [ sort Film::Threat->columns ], [ sort Film->columns ],
6a3bf251 17 'has the same columns';
510ca912 18
19my $bt = Film->create_test_film;
20ok my $btaste = Film::Threat->retrieve('Bad Taste'), "subclass retrieve";
21isa_ok $btaste => "Film::Threat";
22isa_ok $btaste => "Film";
23is $btaste->Title, 'Bad Taste', 'subclass get()';
d9bd5195 24
25done_testing;