Skip to content

Commit

Permalink
fix scheduling.test.js against variable sqlite3 versions - closes #122
Browse files Browse the repository at this point in the history
…(thanks @tomhughes for initial patch)
  • Loading branch information
Dane Springmeyer committed Mar 18, 2013
1 parent 26e7c65 commit 6e47b2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/scheduling.test.js
Expand Up @@ -8,7 +8,7 @@ exports['test scheduling a query after the database was closed'] = function(befo
var db = new sqlite3.Database(':memory:');
db.on('error', function(err) {
error = true;
assert.equal(err.message, "SQLITE_MISUSE: Database handle is closed");
assert.ok(err.message && err.message.indexOf("SQLITE_MISUSE: Database handle is closed") > -1);
});

db.close();
Expand All @@ -30,7 +30,7 @@ exports['test scheduling a query with callback after the database was closed'] =

db.close();
db.run("CREATE TABLE foo (id int)", function(err) {
assert.ok(err.message, "SQLITE_MISUSE: Database handle is closed");
assert.ok(err.message && err.message.indexOf("SQLITE_MISUSE: Database handle is closed") > -1);
error = true;
});

Expand All @@ -49,7 +49,7 @@ exports['test running a query after the database was closed'] = function(beforeE
db.close(function(err) {
assert.ok(err);
error = true;
assert.equal(err.message, "SQLITE_BUSY: unable to close due to unfinalised statements");
assert.ok(err.message && err.message.indexOf("SQLITE_BUSY: unable to close due to") > -1);
stmt.run();
});
});
Expand Down

0 comments on commit 6e47b2d

Please sign in to comment.