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

You need to sign in or sign up before continuing.
Commit 91914618 by Jan Scheurer

Fix unit test

1 parent 9e804c27
Showing with 10 additions and 12 deletions
...@@ -985,18 +985,16 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -985,18 +985,16 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
User.hasMany(Task) User.hasMany(Task)
Task.hasMany(User) Task.hasMany(User)
User.sync({ force: true }).success(function () { this.sequelize.sync({ force: true }).success(function () {
Task.sync({ force: true }).success(function () { User.create({ username: 'foo' }).success(function (user) {
User.create({ username: 'foo' }).success(function (user) { Task.create({ title: 'task' }).success(function (task) {
Task.create({ title: 'task' }).success(function (task) { task.setUsers([ user ]).success(function () {
task.setUsers([ user ]).success(function () { User.create({ username: 'bar' }).success(function (user2) {
User.create({ username: 'bar' }).success(function (user2) { user2.user_has_task = {usertitle: "Something"};
user2.user_has_task = {usertitle: "Something"}; task.setUsers([ user, user2 ]).success(function () {
task.setUsers([ user, user2 ]).success(function () { task.getUsers().success(function (_users) {
task.getUsers().success(function (_users) { expect(_users).to.have.length(2)
expect(_users).to.have.length(2) done()
done()
})
}) })
}) })
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!