chore: finishing unit tests for a couple of services ()

This commit is contained in:
Daniel Dietzler 2024-10-08 23:08:49 +02:00 committed by GitHub
parent f5e0cdedbc
commit 9d0f03808c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 386 additions and 8 deletions
server/src/services

View file

@ -72,6 +72,13 @@ describe('AuthService', () => {
expect(sut).toBeDefined();
});
describe('onBootstrap', () => {
it('should init the repo', () => {
sut.onBootstrap();
expect(oauthMock.init).toHaveBeenCalled();
});
});
describe('login', () => {
it('should throw an error if password login is disabled', async () => {
systemMock.get.mockResolvedValue(systemConfigStub.disabled);