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

Commit 5fdb4fc5 by Sascha Gehlich

Added an alias for sequelize.authenticate: sequelize.validate()

1 parent 6a170cd2
Showing with 8 additions and 0 deletions
...@@ -413,6 +413,8 @@ module.exports = (function() { ...@@ -413,6 +413,8 @@ module.exports = (function() {
}).run() }).run()
} }
Sequelize.prototype.validate = Sequelize.prototype.authenticate;
Sequelize.fn = Sequelize.prototype.fn = function (fn) { Sequelize.fn = Sequelize.prototype.fn = function (fn) {
return new Utils.fn(fn, Array.prototype.slice.call(arguments, 1)) return new Utils.fn(fn, Array.prototype.slice.call(arguments, 1))
} }
......
...@@ -119,6 +119,12 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () { ...@@ -119,6 +119,12 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
}) })
}) })
}) })
describe('validate', function() {
it('is an alias for .authenticate()', function() {
expect(this.sequelize.validate).to.equal(this.sequelize.authenticate)
})
})
} }
describe('getDialect', function() { describe('getDialect', function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!