[Bast-commits] r5604 - in DBIx-Class/0.08/trunk/t: . ordered
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Fri Feb 20 14:33:24 GMT 2009
Author: ribasushi
Date: 2009-02-20 14:33:24 +0000 (Fri, 20 Feb 2009)
New Revision: 5604
Added:
DBIx-Class/0.08/trunk/t/ordered/
DBIx-Class/0.08/trunk/t/ordered/87ordered.t
Log:
Ordered test
Added: DBIx-Class/0.08/trunk/t/ordered/87ordered.t
===================================================================
--- DBIx-Class/0.08/trunk/t/ordered/87ordered.t (rev 0)
+++ DBIx-Class/0.08/trunk/t/ordered/87ordered.t 2009-02-20 14:33:24 UTC (rev 5604)
@@ -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;
More information about the Bast-commits
mailing list