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

Commit 3ee09569 by Daniel Durante

Added a special test for syncing an enum table multiple times.

1 parent 3a94a396
Showing with 17 additions and 1 deletions
......@@ -164,7 +164,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
var UserTable = this.sequelize.define('UserCol', {
aNumber: {
type: Sequelize.INTEGER,
defaultValue: defaultFunction
defaultValue: defaultFunction
}
}, { timestamps: true })
......@@ -949,6 +949,22 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
})
})
it('can safely sync multiple times', function(done) {
var Enum = this.sequelize.define('Enum', {
state: {
type: Sequelize.ENUM,
values: ['happy', 'sad'],
allowNull: true
}
})
Enum.sync({ force: true }).success(function() {
Enum.sync().success(function() {
Enum.sync({ force: true }).complete(done)
})
})
})
})
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!