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