Commit | Line | Data |
c6d74d3e |
1 | package # hide from PAUSE |
2 | Film; |
ea2e61bf |
3 | |
4 | BEGIN { unshift @INC, './t/testlib'; } |
5 | use base 'DBIx::Class::Test::SQLite'; |
6 | use strict; |
7 | |
8 | __PACKAGE__->set_table('Movies'); |
9 | __PACKAGE__->columns('Primary', 'Title'); |
10 | __PACKAGE__->columns('Essential', qw( Title )); |
11 | __PACKAGE__->columns('Directors', qw( Director CoDirector )); |
12 | __PACKAGE__->columns('Other', qw( Rating NumExplodingSheep HasVomit )); |
13 | |
14 | sub create_sql { |
15 | return qq{ |
16 | title VARCHAR(255), |
17 | director VARCHAR(80), |
18 | codirector VARCHAR(80), |
19 | rating CHAR(5), |
20 | numexplodingsheep INTEGER, |
21 | hasvomit CHAR(1) |
22 | } |
23 | } |
24 | |
25 | sub create_test_film { |
26 | return shift->create({ |
27 | Title => 'Bad Taste', |
28 | Director => 'Peter Jackson', |
29 | Rating => 'R', |
30 | NumExplodingSheep => 1, |
31 | }); |
32 | } |
33 | |
34 | package DeletingFilm; |
35 | |
36 | use base 'Film'; |
37 | sub DESTROY { shift->delete } |
38 | |
39 | 1; |
40 | |