[Bast-commits] r7656 - DBIx-Class/0.08/branches/sybase/t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Mon Sep 14 13:33:14 GMT 2009
Author: caelum
Date: 2009-09-14 13:33:14 +0000 (Mon, 14 Sep 2009)
New Revision: 7656
Modified:
DBIx-Class/0.08/branches/sybase/t/746sybase.t
Log:
add another test for sybase bulk stuff (passes)
Modified: DBIx-Class/0.08/branches/sybase/t/746sybase.t
===================================================================
--- DBIx-Class/0.08/branches/sybase/t/746sybase.t 2009-09-14 13:09:21 UTC (rev 7655)
+++ DBIx-Class/0.08/branches/sybase/t/746sybase.t 2009-09-14 13:33:14 UTC (rev 7656)
@@ -11,7 +11,7 @@
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SYBASE_${_}" } qw/DSN USER PASS/};
-my $TESTS = 49 + 2;
+my $TESTS = 52 + 2;
if (not ($dsn && $user)) {
plan skip_all =>
@@ -223,6 +223,32 @@
$bulk_rs->delete;
+# make sure insert_bulk works a second time on the same connection
+ lives_ok {
+ $schema->resultset('Artist')->populate([
+ {
+ name => 'bulk artist 1',
+ charfield => 'bar',
+ },
+ {
+ name => 'bulk artist 2',
+ charfield => 'bar',
+ },
+ {
+ name => 'bulk artist 3',
+ charfield => 'bar',
+ },
+ ]);
+ } 'insert_bulk via populate called a second time';
+
+ is $bulk_rs->count, 3,
+ 'correct number inserted via insert_bulk';
+
+ is ((grep $_->charfield eq 'bar', $bulk_rs->all), 3,
+ 'column set correctly via insert_bulk');
+
+ $bulk_rs->delete;
+
# test invalid insert_bulk (missing required column)
#
# There should be a rollback, reconnect and the next valid insert_bulk should
More information about the Bast-commits
mailing list