Merge branch 'current/for_cpan_index' into current/dq
[dbsrgits/DBIx-Class.git] / t / delete / cascade_missing.t
CommitLineData
51c9ead2 1use strict;
2use warnings;
3
4use Test::More;
5use Test::Warn;
6use Test::Exception;
7
8use lib 't/lib';
9use DBICTest;
10
11my $schema = DBICTest->init_schema();
12$schema->_unregister_source('CD');
13
14warnings_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
27done_testing;
28