Somewhat fix bloody messy test
[dbsrgits/DBIx-Class.git] / t / ordered / cascade_delete.t
CommitLineData
7d7c7bc7 1use strict;
2use warnings;
3
4use Test::More;
5use Test::Exception;
6use lib qw(t/lib);
7use DBICTest;
8
9use POSIX qw(ceil);
10
11my $schema = DBICTest->init_schema();
12
13plan tests => 1;
14
15{
16 my $artist = $schema->resultset ('Artist')->search ({}, { rows => 1})->single, # braindead sqlite
17
18 $schema->storage->debug (1);
19 my $cd = $schema->resultset ('CD')->create ({
20 artist => $artist,
21 title => 'Get in order',
22 year => 2009,
23 tracks => [
24 { title => 'T1' },
25 { title => 'T2' },
26 { title => 'T3' },
27 ],
28 });
29
30 lives_ok (sub { $cd->delete}, "Cascade delete on ordered has_many doesn't bomb");
31}
32
331;