fix(server): oauth linking error message ()

This commit is contained in:
Jason Rasmussen 2024-06-13 11:42:07 -04:00 committed by GitHub
parent 8c2195c820
commit c6ab047167
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 5 deletions
server/src/services

View file

@ -395,12 +395,12 @@ describe('AuthService', () => {
userMock.getAdmin.mockResolvedValue(userStub.user1);
userMock.create.mockResolvedValue(userStub.user1);
await expect(sut.callback({ url: 'http://immich/auth/login?code=abc123' }, loginDetails)).resolves.toEqual(
loginResponseStub.user1oauth,
await expect(sut.callback({ url: 'http://immich/auth/login?code=abc123' }, loginDetails)).rejects.toThrow(
BadRequestException,
);
expect(userMock.update).not.toHaveBeenCalled();
expect(userMock.create).toHaveBeenCalled();
expect(userMock.create).not.toHaveBeenCalled();
});
it('should allow auto registering by default', async () => {