Skip to content

Commit

Permalink
Added a special test for syncing an enum table multiple times.
Browse files Browse the repository at this point in the history
  • Loading branch information
durango committed Oct 29, 2013
1 parent 3a94a39 commit 3ee0956
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion test/dao-factory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })

Expand Down Expand Up @@ -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)
})
})
})
})
})

Expand Down

0 comments on commit 3ee0956

Please sign in to comment.