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

You need to sign in or sign up before continuing.
Commit bf4f1b73 by Overlook Motel

Test for Define adds model to sequelize.models

1 parent 513fec72
Showing with 7 additions and 0 deletions
......@@ -417,6 +417,13 @@ describe(Support.getTestDialectTeaser("Sequelize"), function () {
done()
})
it("adds a new dao to sequelize.models", function(done) {
expect(this.sequelize.models.bar).to.equal(undefined)
var Bar = this.sequelize.define('bar', { title: DataTypes.STRING })
expect(this.sequelize.models.bar).to.equal(Bar)
done()
})
it("overwrites global options", function(done) {
var sequelize = Support.createSequelizeInstance({ define: { collate: 'utf8_general_ci' } })
var DAO = sequelize.define('foo', {bar: DataTypes.STRING}, {collate: 'utf8_bin'})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!