Add maxLimit server configuration (#4048)

* Add maxLimit server configuration

* Fix maxlimit validation logic to correctly handle maxLimit:0 case
This commit is contained in:
Chris Norris
2017-10-02 06:23:09 -07:00
committed by Florent Vilmart
parent 976da4d715
commit 23bffc8883
7 changed files with 63 additions and 0 deletions

View File

@@ -415,6 +415,14 @@ describe('server', () => {
.then(done);
})
it('fails if maxLimit is negative', (done) => {
reconfigureServer({ maxLimit: -100 })
.catch(error => {
expect(error).toEqual('Max limit must be a value greater than 0.');
done();
});
});
it('fails if you try to set revokeSessionOnPasswordReset to non-boolean', done => {
reconfigureServer({ revokeSessionOnPasswordReset: 'non-bool' })
.catch(done);