[Bast-commits] r7749 - DBIx-Class/0.08/branches/sybase_bulkinsert_support/t

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Wed Sep 30 06:53:42 GMT 2009


Author: caelum
Date: 2009-09-30 06:53:42 +0000 (Wed, 30 Sep 2009)
New Revision: 7749

Modified:
   DBIx-Class/0.08/branches/sybase_bulkinsert_support/t/100populate.t
Log:
added test for populate being atomic

Modified: DBIx-Class/0.08/branches/sybase_bulkinsert_support/t/100populate.t
===================================================================
--- DBIx-Class/0.08/branches/sybase_bulkinsert_support/t/100populate.t	2009-09-30 01:48:38 UTC (rev 7748)
+++ DBIx-Class/0.08/branches/sybase_bulkinsert_support/t/100populate.t	2009-09-30 06:53:42 UTC (rev 7749)
@@ -6,8 +6,6 @@
 use lib qw(t/lib);
 use DBICTest;
 
-plan tests => 24;
-
 my $schema = DBICTest->init_schema();
 
 # The map below generates stuff like:
@@ -132,3 +130,26 @@
   $_->rank == 500  &&
   $_->charfield eq 'mtfnpy'
 } $rs->all), 5, 'populate with all literal SQL');
+
+$rs->delete;
+
+throws_ok {
+    $rs->populate([
+        {
+            artistid => 1,
+            name => 'foo1',
+        },
+        {
+            artistid => 'foo', # this dies
+            name => 'foo2',
+        },
+        {
+            artistid => 3,
+            name => 'foo3',
+        },
+    ]);
+} qr/slice/, 'bad slice';
+
+is($rs->count, 0, 'populate is atomic');
+
+done_testing;




More information about the Bast-commits mailing list