mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Move license endpoints to a decorated controller class (no-changelog) (#8074)
This commit is contained in:
committed by
GitHub
parent
63a6e7e034
commit
a63d94f28c
@@ -28,7 +28,7 @@ describe('License', () => {
|
||||
let license: License;
|
||||
const logger = mockInstance(Logger);
|
||||
const instanceSettings = mockInstance(InstanceSettings, { instanceId: MOCK_INSTANCE_ID });
|
||||
const multiMainSetup = mockInstance(MultiMainSetup);
|
||||
mockInstance(MultiMainSetup);
|
||||
|
||||
beforeEach(async () => {
|
||||
license = new License(logger, instanceSettings, mock(), mock(), mock());
|
||||
@@ -85,20 +85,20 @@ describe('License', () => {
|
||||
expect(LicenseManager.prototype.renew).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test('check if feature is enabled', async () => {
|
||||
await license.isFeatureEnabled(MOCK_FEATURE_FLAG);
|
||||
test('check if feature is enabled', () => {
|
||||
license.isFeatureEnabled(MOCK_FEATURE_FLAG);
|
||||
|
||||
expect(LicenseManager.prototype.hasFeatureEnabled).toHaveBeenCalledWith(MOCK_FEATURE_FLAG);
|
||||
});
|
||||
|
||||
test('check if sharing feature is enabled', async () => {
|
||||
await license.isFeatureEnabled(MOCK_FEATURE_FLAG);
|
||||
test('check if sharing feature is enabled', () => {
|
||||
license.isFeatureEnabled(MOCK_FEATURE_FLAG);
|
||||
|
||||
expect(LicenseManager.prototype.hasFeatureEnabled).toHaveBeenCalledWith(MOCK_FEATURE_FLAG);
|
||||
});
|
||||
|
||||
test('check fetching entitlements', async () => {
|
||||
await license.getCurrentEntitlements();
|
||||
test('check fetching entitlements', () => {
|
||||
license.getCurrentEntitlements();
|
||||
|
||||
expect(LicenseManager.prototype.getCurrentEntitlements).toHaveBeenCalled();
|
||||
});
|
||||
@@ -110,7 +110,7 @@ describe('License', () => {
|
||||
});
|
||||
|
||||
test('check management jwt', async () => {
|
||||
await license.getManagementJwt();
|
||||
license.getManagementJwt();
|
||||
|
||||
expect(LicenseManager.prototype.getManagementJwt).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user