From: Peter Rabbitson Date: Fri, 20 Feb 2009 14:33:24 +0000 (+0000) Subject: Ordered test X-Git-Tag: v0.08240~76 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7d7c7bc7cc6057aeb950f93282da5b2c20d3af00;p=dbsrgits%2FDBIx-Class.git Ordered test --- diff --git a/t/ordered/87ordered.t b/t/ordered/87ordered.t new file mode 100644 index 0000000..8a95420 --- /dev/null +++ b/t/ordered/87ordered.t @@ -0,0 +1,33 @@ +use strict; +use warnings; + +use Test::More; +use Test::Exception; +use lib qw(t/lib); +use DBICTest; + +use POSIX qw(ceil); + +my $schema = DBICTest->init_schema(); + +plan tests => 1; + +{ + my $artist = $schema->resultset ('Artist')->search ({}, { rows => 1})->single, # braindead sqlite + + $schema->storage->debug (1); + my $cd = $schema->resultset ('CD')->create ({ + artist => $artist, + title => 'Get in order', + year => 2009, + tracks => [ + { title => 'T1' }, + { title => 'T2' }, + { title => 'T3' }, + ], + }); + + lives_ok (sub { $cd->delete}, "Cascade delete on ordered has_many doesn't bomb"); +} + +1;