2025-02-10 18:47:42 -05:00
|
|
|
import { ApiKeyRepository } from 'src/repositories/api-key.repository';
|
|
|
|
|
import { RepositoryInterface } from 'src/types';
|
2024-04-16 10:44:45 -04:00
|
|
|
import { Mocked, vitest } from 'vitest';
|
2023-01-18 09:40:15 -05:00
|
|
|
|
2025-02-10 18:47:42 -05:00
|
|
|
export const newKeyRepositoryMock = (): Mocked<RepositoryInterface<ApiKeyRepository>> => {
|
2023-01-18 09:40:15 -05:00
|
|
|
return {
|
2024-04-16 10:44:45 -04:00
|
|
|
create: vitest.fn(),
|
|
|
|
|
update: vitest.fn(),
|
|
|
|
|
delete: vitest.fn(),
|
|
|
|
|
getKey: vitest.fn(),
|
|
|
|
|
getById: vitest.fn(),
|
|
|
|
|
getByUserId: vitest.fn(),
|
2023-01-18 09:40:15 -05:00
|
|
|
};
|
|
|
|
|
};
|