Added a test to confirm isLimited behavior of an unkown key

no issue
This commit is contained in:
Thibaut Patel 2021-04-08 15:07:30 +02:00
parent 666907f853
commit 8c6ec8b214

View File

@ -126,6 +126,19 @@ describe('Limit Service', function () {
limitService.isLimited('custom_themes').should.be.true();
limitService.isLimited('customThemes').should.be.true();
});
it('answers correctly when no limits are provided', function () {
const limitService = new LimitService();
let limits = {};
limitService.loadLimits({limits, errors});
limitService.isLimited('staff').should.be.false();
limitService.isLimited('members').should.be.false();
limitService.isLimited('custom_themes').should.be.false();
limitService.isLimited('customThemes').should.be.false();
});
});
describe('Custom limit count query configuration', function () {