Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / delete / cascade_missing.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
51c9ead2 3use strict;
4use warnings;
5
6use Test::More;
7use Test::Warn;
8use Test::Exception;
9
c0329273 10
51c9ead2 11use DBICTest;
12
13my $schema = DBICTest->init_schema();
14$schema->_unregister_source('CD');
15
9a94cf93 16warnings_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
29done_testing;
30