diff --git a/ee/packages/license/src/license.spec.ts b/ee/packages/license/src/license.spec.ts index 989be7b69ae1..b637ee33ddfd 100644 --- a/ee/packages/license/src/license.spec.ts +++ b/ee/packages/license/src/license.spec.ts @@ -41,6 +41,30 @@ it('should prevent if the counter is equal or over the limit', async () => { await expect(licenseManager.shouldPreventAction('activeUsers')).resolves.toBe(true); }); +it.skip('should not prevent an action if another limit is over the limit', async () => { + const licenseManager = await getReadyLicenseManager(); + + const license = await new MockedLicenseBuilder() + .withLimits('activeUsers', [ + { + max: 10, + behavior: 'prevent_action', + }, + ]) + .withLimits('monthlyActiveContacts', [ + { + max: 10, + behavior: 'prevent_action', + }, + ]); + + await expect(licenseManager.setLicense(await license.sign())).resolves.toBe(true); + + licenseManager.setLicenseLimitCounter('activeUsers', () => 11); + licenseManager.setLicenseLimitCounter('monthlyActiveContacts', () => 2); + await expect(licenseManager.shouldPreventAction('monthlyActiveContacts')).resolves.toBe(false); +}); + describe('Validate License Limits', () => { describe('prevent_action behavior', () => { describe('during the licensing apply', () => {