Skip to content

Commit

Permalink
Merge pull request #225 from ericwaldheim/prepstmttest
Browse files Browse the repository at this point in the history
prepare statement regression test
  • Loading branch information
joeferner committed Oct 23, 2014
2 parents 2afb3f2 + 36b76b3 commit 66759fe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/integration.js
Expand Up @@ -199,6 +199,24 @@ exports['IntegrationTest'] = nodeunit.testCase({
});
},

"prepare statement": function(test) {
var self = this;
var stmt = self.connection.prepare("INSERT INTO person (name) VALUES (:1)");
stmt.execute(["Bill O'Neil"], function(err, count) {
if(err) { console.error(err); return; }
stmt.execute(["Bob Johnson"], function(err, count) {
if(err) { console.error(err); return; }
self.connection.execute("SELECT * FROM person WHERE name = :1", ["Bill O'Neil"], function(err, results) {
if(err) { console.error(err); return; }
//console.log(results);
test.equal(results.length, 1);
test.equal(results[0]['NAME'], "Bill O'Neil");
test.done();
});
});
});
},

"utf8_chars_in_query": function(test) {
var self = this,
cyrillicString = "тест";
Expand Down

0 comments on commit 66759fe

Please sign in to comment.