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