mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 11:15:54 +02:00
deb1f970a8
* feat: quotas * chore: open api * chore: update status box and upload error message --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
26 lines
598 B
TypeScript
26 lines
598 B
TypeScript
import { IUserRepository, UserCore } from '@app/domain';
|
|
|
|
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(),
|
|
restore: jest.fn(),
|
|
hasAdmin: jest.fn(),
|
|
updateUsage: jest.fn(),
|
|
syncUsage: jest.fn(),
|
|
};
|
|
};
|