mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 11:56:46 +01:00
b588a87d4a
rename domain repositories
25 lines
630 B
TypeScript
25 lines
630 B
TypeScript
import { UserCore } from 'src/cores/user.core';
|
|
import { IUserRepository } from 'src/interfaces/user.interface';
|
|
|
|
export const newUserRepositoryMock = (reset = true): jest.Mocked<IUserRepository> => {
|
|
if (reset) {
|
|
UserCore.reset();
|
|
}
|
|
|
|
return {
|
|
get: jest.fn(),
|
|
getAdmin: jest.fn(),
|
|
getByEmail: jest.fn(),
|
|
getByStorageLabel: jest.fn(),
|
|
getByOAuthId: jest.fn(),
|
|
getUserStats: jest.fn(),
|
|
getList: jest.fn(),
|
|
create: jest.fn(),
|
|
update: jest.fn(),
|
|
delete: jest.fn(),
|
|
getDeletedUsers: jest.fn(),
|
|
hasAdmin: jest.fn(),
|
|
updateUsage: jest.fn(),
|
|
syncUsage: jest.fn(),
|
|
};
|
|
};
|