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

Commit 6177a95d by Felix Becker Committed by Mick Hansen

Test fixes (#6038)

* Fix this reference in instance test

* Fix instance validation test
1 parent 4fa35163
...@@ -223,7 +223,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() { ...@@ -223,7 +223,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() {
it('should still work right with other concurrent increments', function() { it('should still work right with other concurrent increments', function() {
var self = this; var self = this;
return this.User.findById(1).then(function(user1) { return this.User.findById(1).then(function(user1) {
return this.sequelize.Promise.all([ return self.sequelize.Promise.all([
user1.increment(['aNumber'], { by: 2 }), user1.increment(['aNumber'], { by: 2 }),
user1.increment(['aNumber'], { by: 2 }), user1.increment(['aNumber'], { by: 2 }),
user1.increment(['aNumber'], { by: 2 }) user1.increment(['aNumber'], { by: 2 })
...@@ -349,7 +349,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() { ...@@ -349,7 +349,7 @@ describe(Support.getTestDialectTeaser('Instance'), function() {
it('should still work right with other concurrent increments', function() { it('should still work right with other concurrent increments', function() {
var self = this; var self = this;
return this.User.findById(1).then(function(user1) { return this.User.findById(1).then(function(user1) {
return this.sequelize.Promise.all([ return self.sequelize.Promise.all([
user1.decrement(['aNumber'], { by: 2 }), user1.decrement(['aNumber'], { by: 2 }),
user1.decrement(['aNumber'], { by: 2 }), user1.decrement(['aNumber'], { by: 2 }),
user1.decrement(['aNumber'], { by: 2 }) user1.decrement(['aNumber'], { by: 2 })
......
...@@ -342,7 +342,7 @@ describe(Support.getTestDialectTeaser('InstanceValidator'), function() { ...@@ -342,7 +342,7 @@ describe(Support.getTestDialectTeaser('InstanceValidator'), function() {
return this.Project.create({}).catch(function(err) { return this.Project.create({}).catch(function(err) {
expect(err).to.be.an.instanceOf(Error); expect(err).to.be.an.instanceOf(Error);
delete err.stack; // longStackTraces delete err.stack; // longStackTraces
expect(Object.keys(err)).to.have.length(3); expect(err.errors).to.have.length(3);
}); });
}); });
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!