Subject: | now bulk_insert doesn't fail |
SQLite test expects bulk_insert fails.
But now SQLite allows bulk_insert. The test doesn't fail.
Please see patch.
Subject: | test-sqlite-constract-fixture.diff |
--- t/sqlite/construct_fixture.t 2010-08-28 19:33:55.000000000 +0900
+++ /tmp/construct_fixture.t 2015-01-31 17:58:01.905767187 +0900
@@ -323,7 +323,7 @@
done_testing;
};
-subtest 'fail bulk_insret' => sub {
+subtest 'bulk_insret' => sub {
my $dbh = $connector->dbh;
my $database = construct_database(
@@ -332,7 +332,7 @@
schema => [qw/people/],
);
- dies_ok(
+ lives_ok(
sub {
construct_fixture(
dbh => $dbh,
@@ -340,7 +340,20 @@
fixture => $fixture->{people_001},
);
},
- 'bulk_insert not support',
+ 'bulk_insert will be success',
+ );
+
+ is_deeply(
+ $dbh->selectall_arrayref(
+ 'SELECT id, nickname, status FROM people ORDER BY id ASC',
+ +{ Slice => +{} }
+ ),
+ [
+ +{ id => 1, nickname => 'zigorou', status => 0, },
+ +{ id => 2, nickname => 'hidek', status => 1, },
+ +{ id => 3, nickname => 'xaicron', status => 2, },
+ ],
+ 'fixture people test with bulk_insert'
);
$dbh->disconnect;