Commit | Line | Data |
c0329273 |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
51c9ead2 |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More; |
7 | use Test::Warn; |
8 | use Test::Exception; |
9 | |
c0329273 |
10 | |
51c9ead2 |
11 | use DBICTest; |
12 | |
13 | my $schema = DBICTest->init_schema(); |
14 | $schema->_unregister_source('CD'); |
15 | |
9a94cf93 |
16 | warnings_exist { |
65d35121 |
17 | my $s = $schema; |
51c9ead2 |
18 | lives_ok { |
65d35121 |
19 | $_->delete for $s->resultset('Artist')->all; |
51c9ead2 |
20 | } 'delete on rows with dangling rels lives'; |
21 | } [ |
9a94cf93 |
22 | # 9 == 3 artists * failed cascades: |
51c9ead2 |
23 | # cds |
24 | # cds_unordered |
25 | # cds_very_very_very_long_relationship_name |
26 | (qr/skipping cascad/i) x 9 |
27 | ], 'got warnings about cascading deletes'; |
28 | |
29 | done_testing; |
30 | |