diff --git a/t/03insert.t b/t/03insert.t index a5d3460..91f7d72 100644 --- a/t/03insert.t +++ b/t/03insert.t @@ -2,8 +2,9 @@ use strict; use Test; use DBI; BEGIN { plan tests => 11 } -my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", ""); +my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", {AutoCommit => 1}); ok($dbh); +$dbh->do("CREATE TABLE f (f1, f2, f3)"); ok($dbh->do("delete from f")); my $sth = $dbh->prepare("INSERT INTO f VALUES (?, ?, ?)", { go_last_insert_id_args => [undef, undef, undef, undef] }); ok($sth); diff --git a/t/04select.t b/t/04select.t index f95afb8..8da95d8 100644 --- a/t/04select.t +++ b/t/04select.t @@ -2,8 +2,12 @@ use strict; use Test; BEGIN { plan tests => 21 } use DBI; -my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", { RaiseError => 1 }); +my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", { RaiseError => 1, AutoCommit => 1 }); ok($dbh); +$dbh->do("CREATE TABLE f (f1, f2, f3)"); +my $sth = $dbh->prepare("INSERT INTO f VALUES (?, ?, ?)", { go_last_insert_id_args => [undef, undef, undef, undef] }); +$sth->execute("Fred", "Bloggs", "fred\@bloggs.com"); + # $dbh->trace(4); my $sth = $dbh->prepare("SELECT * FROM f"); ok($sth);