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

Commit 9e3bbc83 by Mick Hansen

fix(test): .done -> .then

1 parent abf033c0
Showing with 4 additions and 4 deletions
...@@ -43,16 +43,16 @@ describe(Support.getTestDialectTeaser('Include'), function() { ...@@ -43,16 +43,16 @@ describe(Support.getTestDialectTeaser('Include'), function() {
, User = this.sequelize.define('User', {}) , User = this.sequelize.define('User', {})
, Employer = User.belongsTo(Company, {as: 'Employer'}); , Employer = User.belongsTo(Company, {as: 'Employer'});
return this.sequelize.sync({force: true}).done(function() { return this.sequelize.sync({force: true}).then(function() {
return User.create(); return User.create();
}).then(function () { }).then(function () {
return User.find({ return User.findOne({
include: [Employer] include: [Employer]
});
}).then(function (user) { }).then(function (user) {
expect(user).to.be.ok; expect(user).to.be.ok;
}); });
}); });
});
it('should support a empty hasOne include', function(done) { it('should support a empty hasOne include', function(done) {
var Company = this.sequelize.define('Company', {}) var Company = this.sequelize.define('Company', {})
...@@ -77,7 +77,7 @@ describe(Support.getTestDialectTeaser('Include'), function() { ...@@ -77,7 +77,7 @@ describe(Support.getTestDialectTeaser('Include'), function() {
, Person = this.sequelize.define('Person', {}) , Person = this.sequelize.define('Person', {})
, CEO = Company.hasOne(Person, {as: 'CEO'}); , CEO = Company.hasOne(Person, {as: 'CEO'});
return this.sequelize.sync({force: true}).done(function() { return this.sequelize.sync({force: true}).then(function() {
return Company.create(); return Company.create();
}).then(function () { }).then(function () {
return Company.find({ return Company.find({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!