Commit | Line | Data |
7d7c7bc7 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use Test::Exception; |
6 | use lib qw(t/lib); |
7 | use DBICTest; |
8 | |
9 | use POSIX qw(ceil); |
10 | |
11 | my $schema = DBICTest->init_schema(); |
12 | |
13 | plan tests => 1; |
14 | |
15 | { |
362d4549 |
16 | my $artist = $schema->resultset ('Artist')->search ({}, { rows => 1})->single; # braindead sqlite |
7d7c7bc7 |
17 | my $cd = $schema->resultset ('CD')->create ({ |
18 | artist => $artist, |
19 | title => 'Get in order', |
20 | year => 2009, |
21 | tracks => [ |
22 | { title => 'T1' }, |
23 | { title => 'T2' }, |
24 | { title => 'T3' }, |
25 | ], |
26 | }); |
27 | |
28 | lives_ok (sub { $cd->delete}, "Cascade delete on ordered has_many doesn't bomb"); |
29 | } |
30 | |
31 | 1; |