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

Commit 34fe92c6 by Mick Hansen

Fix existing include tests

1 parent 1139fa0b
......@@ -502,7 +502,7 @@ module.exports = (function() {
return attr
}.bind(this))
mainAttributes = mainAttributes || (subQuery ? [options.table+'.*'] : ['*'])
mainAttributes = mainAttributes || (options.include ? [options.table+'.*'] : ['*'])
if (subQuery) {
subQueryAttributes = mainAttributes
......
......@@ -364,6 +364,7 @@ module.exports = (function() {
})
delete result.__children
})
return results
}
......
......@@ -391,11 +391,14 @@ describe(Support.getTestDialectTeaser("Include"), function () {
Price
]}
],
order: 'id ASC'
order: [
['Users.id', 'ASC']
]
}).done(function (err, users) {
expect(err).not.to.be.ok
users.forEach(function (user, i) {
user.memberships.sort(sortById)
expect(user.memberships.length).to.equal(2)
expect(user.memberships[0].group.name).to.equal('Developers')
expect(user.memberships[0].rank.canRemove).to.equal(1)
......@@ -1138,8 +1141,6 @@ describe(Support.getTestDialectTeaser("Include"), function () {
expect(product.prices.length).to.be.ok
})
done()
}).on('sql', function (sql) {
console.log(sql)
})
})
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!