不要怂,就是干,撸起袖子干!

Commit 64c29225 by Mick Hansen

set the _dialect on query generator in dialect specific tests

1 parent ada11189
......@@ -113,7 +113,7 @@ module.exports = (function() {
}
try {
this.dialect = new (require("./dialects/" + this.getDialect()))(this)
this.dialect = new (require("./dialects/" + this.getDialect()))(this)
} catch(err) {
throw new Error("The dialect " + this.getDialect() + " is not supported.")
}
......
......@@ -516,6 +516,7 @@ if (Support.dialectIsMySQL()) {
test.arguments[1] = test.arguments[1](this.sequelize)
}
QueryGenerator.options = context.options
QueryGenerator._dialect = this.sequelize.dialect
var conditions = QueryGenerator[suiteTitle].apply(QueryGenerator, test.arguments)
expect(conditions).to.deep.equal(test.expectation)
done()
......
......@@ -904,6 +904,7 @@ if (dialect.match(/^postgres/)) {
test.arguments[1] = test.arguments[1](this.sequelize)
}
QueryGenerator.options = context.options
QueryGenerator._dialect = this.sequelize.dialect
var conditions = QueryGenerator[suiteTitle].apply(QueryGenerator, test.arguments)
expect(conditions).to.deep.equal(test.expectation)
done()
......
......@@ -444,6 +444,7 @@ if (dialect === 'sqlite') {
test.arguments[1] = test.arguments[1](this.sequelize)
}
QueryGenerator.options = context.options
QueryGenerator._dialect = this.sequelize.dialect
var conditions = QueryGenerator[suiteTitle].apply(QueryGenerator, test.arguments)
expect(conditions).to.deep.equal(test.expectation)
done()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!