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

Commit cf637c52 by Daniel Durante

Merged master

1 parent 00de8764
Showing with 8 additions and 9 deletions
......@@ -292,6 +292,13 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
})
})
it('correctly throws an error using create method ', function(done) {
this.Project.create({name: 'nope'}).error(function(err) {
expect(err).to.have.ownProperty('name')
done()
})
})
it('correctly validates using create method ', function(done) {
var self = this
this.Project.create({}).success(function(project) {
......@@ -323,7 +330,7 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
User.sync({ force: true }).success(function() {
User.create({id: 'helloworld'}).error(function(err) {
expect(err).to.deep.equal({id: ['Invalid integer: id']})
expect(err).to.deep.equal({id: ['Invalid integer']})
done()
})
})
......@@ -369,14 +376,6 @@ describe(Support.getTestDialectTeaser("DaoValidator"), function() {
})
})
})
it('correctly throws an error using create method ', function(done) {
var self = this
this.Project.create({name: 'nope'}).error(function(err) {
expect(err).to.have.ownProperty('name')
done()
})
})
})
it('correctly validates using custom validation methods', function(done) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!