Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Commit

Permalink
Tests to allow to override paginate in params (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Jun 16, 2016
1 parent f49db8b commit 31e98c2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/common-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,16 @@ export default function common(people, _ids, errors, idProp = 'id') {
done();
}).catch(done);
});

it('allows to override paginate in params', done => {
people.find({ paginate: { default: 2 } }).then(paginator => {
expect(paginator.limit).to.equal(2);
expect(paginator.skip).to.equal(0);
return people.find({ paginate: false }).then(results =>
expect(results.length).to.equal(3)
);
}).then(() => done()).catch(done);
});
});
});

Expand Down

0 comments on commit 31e98c2

Please sign in to comment.