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

Commit 7aa4c0ea by Mick Hansen

unit test for #2231

1 parent b7e567ba
Showing with 12 additions and 0 deletions
...@@ -357,6 +357,18 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -357,6 +357,18 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
}) })
}) })
it('should work with a non-id named uuid primary key columns', function () {
var Monkey = this.sequelize.define('Monkey', {
monkeyId: { type: DataTypes.UUID, primaryKey: true, defaultValue: DataTypes.UUIDV4, allowNull: false }
});
return this.sequelize.sync({force: true}).then(function () {
return Monkey.create();
}).then(function (monkey) {
expect(monkey.get('monkeyId')).to.be.ok;
});
})
it('is possible to use functions as default values', function (done) { it('is possible to use functions as default values', function (done) {
var self = this var self = this
, userWithDefaults , userWithDefaults
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!