Skip to content

Commit

Permalink
Make tests that branch on drivers use the adapter field.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfinkhaeuser committed Nov 27, 2013
1 parent a6be1bf commit 1671758
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/last_insert_id.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ require('./helpers').allDrivers("Last insert id",
t.plan(2)

conn.query("DROP TABLE last_insert_id_test", function (err) {})
if (t.conf.name == 'sqlite3')
if (conn.adapter == 'sqlite3')
conn.query("CREATE TABLE last_insert_id_test (id integer primary key autoincrement, a int)")
else if (t.conf.name == 'mysql')
else if (conn.adapter == 'mysql')
conn.query("CREATE TABLE last_insert_id_test (id integer primary key auto_increment, a int)")

conn.query('INSERT INTO last_insert_id_test (a) VALUES (123)', function (err, res) {
Expand Down

0 comments on commit 1671758

Please sign in to comment.