mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): auth dto (#5593)
* refactor: AuthUserDto => AuthDto * refactor: reorganize auth-dto * refactor: AuthUser() => Auth()
This commit is contained in:
parent
8057c375ba
commit
33529d1d9b
60 changed files with 1033 additions and 1065 deletions
|
|
@ -632,7 +632,7 @@ describe(LibraryService.name, () => {
|
|||
|
||||
await expect(sut.getCount(authStub.admin)).resolves.toBe(17);
|
||||
|
||||
expect(libraryMock.getCountForUser).toHaveBeenCalledWith(authStub.admin.id);
|
||||
expect(libraryMock.getCountForUser).toHaveBeenCalledWith(authStub.admin.user.id);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -673,7 +673,7 @@ describe(LibraryService.name, () => {
|
|||
}),
|
||||
]);
|
||||
|
||||
expect(libraryMock.getAllByUserId).toHaveBeenCalledWith(authStub.admin.id);
|
||||
expect(libraryMock.getAllByUserId).toHaveBeenCalledWith(authStub.admin.user.id);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -963,10 +963,10 @@ describe(LibraryService.name, () => {
|
|||
describe('update', () => {
|
||||
it('can update library ', async () => {
|
||||
libraryMock.update.mockResolvedValue(libraryStub.uploadLibrary1);
|
||||
await expect(sut.update(authStub.admin, authStub.admin.id, {})).resolves.toBeTruthy();
|
||||
await expect(sut.update(authStub.admin, authStub.admin.user.id, {})).resolves.toBeTruthy();
|
||||
expect(libraryMock.update).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
id: authStub.admin.id,
|
||||
id: authStub.admin.user.id,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue