Permalink
Browse files

Updated test to perform driver-specific escaping

  • Loading branch information...
1 parent 8def895 commit 0f5a974a14ed0cbfe28a3523af24c0c3def4753d @charmander charmander committed Dec 19, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/escape.js
View
3 test/escape.js
@@ -1,5 +1,6 @@
"use strict";
+var util = require("util");
var assert = require("assert");
var nodeunit = require("nodeunit");
var persist = require("../lib/persist");
@@ -14,7 +15,7 @@ exports['Escape'] = nodeunit.testCase({
testUtils.connect(persist, {}, function(err, connection) {
test.ifError(err);
- connection.runSql('CREATE TABLE TaxonomicClasses("order" INT NOT NULL);', function(err) {
+ connection.runSql(util.format('CREATE TABLE TaxonomicClasses(%s INT NOT NULL);', connection.driver.escapeColumnName('order')), function(err) {
test.ifError(err);
var t = new TaxonomicClass({ order: "Lepidoptera" });

0 comments on commit 0f5a974

Please sign in to comment.