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

Commit 2dbc0075 by Sascha Depold

test for boolean defaults

1 parent d4104d3b
......@@ -12,7 +12,7 @@ var Task = sequelize.define('Task', {
// You can also set some options:
var Foo = sequelize.define('Foo', {
// instantiating will automatically set the flag to true if not set
flag: { type: Sequelize.BOOLEAN, allowNull: false, default: true},
flag: { dataType: Sequelize.BOOLEAN, allowNull: false, defaultValue: true},
// setting no title will throw an error when trying to save
title: { type: Sequelize.STRING, allowNull: false}
title: { dataType: Sequelize.STRING, allowNull: false}
})
\ No newline at end of file
......@@ -30,10 +30,10 @@ module.exports = {
User.create({username: 'foo', smth: null}).on('failure', function(err) {
assert.eql(err.message, "Column 'smth' cannot be null")
User.create({username: 'foo'}).on('failure', function(err) {
assert.eql(err.message, "Column 'smth' cannot be null")
assert.eql(err.message, "Colusmn 'smth' cannot be null")
exit(function(){})
})
})
})
}
},
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!