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

Commit 3078c192 by Richard Comley

also removing offset

1 parent 15eac3e5
Showing with 11 additions and 0 deletions
......@@ -1345,6 +1345,7 @@ Model.prototype.count = function(options) {
options.dataType = new DataTypes.INTEGER();
options.includeIgnoreAttributes = false;
options.limit = null;
options.offset = null;
options.order = null;
return this.aggregate(col, 'count', options);
......
......@@ -1693,6 +1693,16 @@ describe(Support.getTestDialectTeaser('Model'), function() {
});
});
it('modifies option "offset" by setting it to null', function() {
options.offset = 10;
return this.User.count(options).then(function() {
var optsArg = aggregateSpy.args[0][2];
expect(optsArg.offset).to.equal(null);
});
});
it('modifies option "order" by setting it to null', function() {
options.order = "username";
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!