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

Commit 5eff94e1 by Mick Hansen

dont run orderBy literal tests for mssql, @mbroadst will have to fix later

1 parent 6ca09791
......@@ -39,5 +39,6 @@ MssqlDialect.prototype.supports = _.merge(_.cloneDeep(Abstract.prototype.support
});
MssqlDialect.prototype.Query = Query;
MssqlDialect.prototype.name = 'mssql';
module.exports = MssqlDialect;
......@@ -32,40 +32,42 @@ describe(Support.getTestDialectTeaser('Model'), function() {
});
});
it('should work with order: literal()', function () {
return this.User.findAll({
order: this.sequelize.literal("email = "+this.sequelize.escape('test@sequelizejs.com'))
}).then(function (users) {
expect(users.length).to.equal(1);
users.forEach(function (user) {
expect(user.get('email')).to.be.ok;
if (current.dialect.name !== 'mssql') {
it('should work with order: literal()', function () {
return this.User.findAll({
order: this.sequelize.literal("email = "+this.sequelize.escape('test@sequelizejs.com'))
}).then(function (users) {
expect(users.length).to.equal(1);
users.forEach(function (user) {
expect(user.get('email')).to.be.ok;
});
});
});
});
it('should work with order: [literal()]', function () {
return this.User.findAll({
order: [this.sequelize.literal("email = "+this.sequelize.escape('test@sequelizejs.com'))]
}).then(function (users) {
expect(users.length).to.equal(1);
users.forEach(function (user) {
expect(user.get('email')).to.be.ok;
it('should work with order: [literal()]', function () {
return this.User.findAll({
order: [this.sequelize.literal("email = "+this.sequelize.escape('test@sequelizejs.com'))]
}).then(function (users) {
expect(users.length).to.equal(1);
users.forEach(function (user) {
expect(user.get('email')).to.be.ok;
});
});
});
});
it('should work with order: [[literal()]]', function () {
return this.User.findAll({
order: [
[this.sequelize.literal("email = "+this.sequelize.escape('test@sequelizejs.com'))]
]
}).then(function (users) {
expect(users.length).to.equal(1);
users.forEach(function (user) {
expect(user.get('email')).to.be.ok;
it('should work with order: [[literal()]]', function () {
return this.User.findAll({
order: [
[this.sequelize.literal("email = "+this.sequelize.escape('test@sequelizejs.com'))]
]
}).then(function (users) {
expect(users.length).to.equal(1);
users.forEach(function (user) {
expect(user.get('email')).to.be.ok;
});
});
});
});
}
});
});
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!