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