Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adds test for limit and skip + limit on `all()` queries as in docs.

(Currently not all adapters may pass.)
  • Loading branch information...
commit 57baae838e9bee7855331a05abd0228232fa063b 1 parent 74ef2a6
dgsan authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 test/basic-querying.test.js
View
18 test/basic-querying.test.js
@@ -60,6 +60,24 @@ describe('basic-querying', function() {
done();
});
});
+
+ it('should query limited collection', function(done) {
+ User.all({limit: 3}, function(err, users) {
+ should.exists(users);
+ should.not.exists(err);
+ users.should.have.lengthOf(3);
+ done();
+ });
+ });
+
+ it('should query offset collection with limit', function(done) {
+ User.all({skip: 1, limit: 4}, function(err, users) {
+ should.exists(users);
+ should.not.exists(err);
+ users.should.have.lengthOf(4);
+ done();
+ });
+ });
it('should query filtered collection', function(done) {
User.all({where: {role: 'lead'}}, function(err, users) {
Please sign in to comment.
Something went wrong with that request. Please try again.