2024-03-21 12:59:49 +01:00
|
|
|
import { IUserRepository } from 'src/interfaces/user.interface';
|
2024-04-16 16:44:45 +02:00
|
|
|
import { Mocked, vitest } from 'vitest';
|
2023-10-23 14:38:48 +02:00
|
|
|
|
2024-09-30 22:04:24 +02:00
|
|
|
export const newUserRepositoryMock = (): Mocked<IUserRepository> => {
|
2023-01-18 15:40:15 +01:00
|
|
|
return {
|
2024-04-16 16:44:45 +02:00
|
|
|
get: vitest.fn(),
|
|
|
|
getAdmin: vitest.fn(),
|
|
|
|
getByEmail: vitest.fn(),
|
|
|
|
getByStorageLabel: vitest.fn(),
|
|
|
|
getByOAuthId: vitest.fn(),
|
|
|
|
getUserStats: vitest.fn(),
|
|
|
|
getList: vitest.fn(),
|
|
|
|
create: vitest.fn(),
|
|
|
|
update: vitest.fn(),
|
|
|
|
delete: vitest.fn(),
|
|
|
|
getDeletedUsers: vitest.fn(),
|
|
|
|
hasAdmin: vitest.fn(),
|
|
|
|
updateUsage: vitest.fn(),
|
|
|
|
syncUsage: vitest.fn(),
|
2024-05-22 14:13:36 +02:00
|
|
|
upsertMetadata: vitest.fn(),
|
2024-07-01 19:43:16 +02:00
|
|
|
deleteMetadata: vitest.fn(),
|
2023-01-18 15:40:15 +01:00
|
|
|
};
|
|
|
|
};
|