mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
test: Add tests for license manager reinit method (#9471)
This commit is contained in:
parent
ffe034c72e
commit
c1eef60ccd
|
@ -252,4 +252,20 @@ describe('License', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('reinit', () => {
|
||||||
|
it('should reinitialize license manager', async () => {
|
||||||
|
const license = new License(mock(), mock(), mock(), mock(), mock());
|
||||||
|
await license.init();
|
||||||
|
|
||||||
|
const initSpy = jest.spyOn(license, 'init');
|
||||||
|
|
||||||
|
await license.reinit();
|
||||||
|
|
||||||
|
expect(initSpy).toHaveBeenCalledWith('main', true);
|
||||||
|
|
||||||
|
expect(LicenseManager.prototype.reset).toHaveBeenCalled();
|
||||||
|
expect(LicenseManager.prototype.initialize).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue