Remove 37b5ab51 test warnings on older perls
[dbsrgits/DBIx-Class.git] / t / ordered / cascade_delete.t
CommitLineData
7d7c7bc7 1use strict;
8273e845 2use warnings;
7d7c7bc7 3
4use Test::More;
5use Test::Exception;
6use lib qw(t/lib);
7use DBICTest;
8
7d7c7bc7 9my $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 27done_testing;