X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F19quotes_newstyle.t;h=02c145070649cfd91d80acd6d1786da53b3a5109;hb=9c0df5f32b68e23c670c89ce6cdbff60b4bd0ed0;hp=b9d7411a8a8d9c51131697e2b00e1cf0e9c94c31;hpb=c216324aa4b0f79ba056fbe74adbd735421e378a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/19quotes_newstyle.t b/t/19quotes_newstyle.t index b9d7411..02c1450 100644 --- a/t/19quotes_newstyle.t +++ b/t/19quotes_newstyle.t @@ -22,7 +22,13 @@ my $orig_debug = $schema->storage->debug; diag('Testing against ' . join(' ', map { $schema->storage->dbh->get_info($_) } qw/17 18/)); my $dsn = $schema->storage->connect_info->[0]; -$schema->connection($dsn, { quote_char => '`', name_sep => '.' }); +$schema->connection( + $dsn, + undef, + undef, + { AutoCommit => 1 }, + { quote_char => '`', name_sep => '.' }, +); my $sql = ''; $schema->storage->debugcb(sub { $sql = $_[1] }); @@ -47,7 +53,12 @@ $rs = $schema->resultset('CD')->search({}, eval { $rs->first }; like($sql, qr/ORDER BY \Q${order}\E/, 'did not quote ORDER BY with scalarref'); -$schema->connection($dsn, { quote_char => [qw/[ ]/], name_sep => '.' }); +$schema->connection( + $dsn, + undef, + undef, + { AutoCommit => 1, quote_char => [qw/[ ]/], name_sep => '.' } +); $schema->storage->debugcb(sub { $sql = $_[1] }); $schema->storage->debug(1); @@ -62,7 +73,12 @@ my %data = ( order => '12' ); -$schema->connection($dsn, { quote_char => '`', name_sep => '.' }); +$schema->connection( + $dsn, + undef, + undef, + { AutoCommit => 1, quote_char => '`', name_sep => '.' } +); is($schema->storage->sql_maker->update('group', \%data), 'UPDATE `group` SET `name` = ?, `order` = ?', 'quoted table names for UPDATE');