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

fix tests with new built-in validation object

1 parent 6bff9ebe
Showing with 3 additions and 3 deletions
......@@ -940,7 +940,7 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
})
it('emits an error when validate is set to true', function(done) {
it.only('emits an error when validate is set to true', function(done) {
var Tasks = this.sequelize.define('Task', {
name: {
type: Sequelize.STRING,
......@@ -966,10 +966,10 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
expect(errors).to.be.instanceof(Array)
expect(errors).to.have.length(2)
expect(errors[0].record.code).to.equal('1234')
expect(errors[0].errors.name[0]).to.equal('name cannot be null')
expect(errors[0].errors.name[0].message).to.equal('name cannot be null')
expect(errors[1].record.name).to.equal('bar')
expect(errors[1].record.code).to.equal('1')
expect(errors[1].errors.code[0]).to.equal('Validation len failed')
expect(errors[1].errors.code[0].message).to.equal('Validation len failed')
done()
})
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!