import { AccessCore } from 'src/cores/access.core'; import { IAccessRepository } from 'src/interfaces/access.repository'; export interface IAccessRepositoryMock { activity: jest.Mocked; asset: jest.Mocked; album: jest.Mocked; authDevice: jest.Mocked; library: jest.Mocked; timeline: jest.Mocked; person: jest.Mocked; partner: jest.Mocked; } export const newAccessRepositoryMock = (reset = true): IAccessRepositoryMock => { if (reset) { AccessCore.reset(); } return { activity: { checkOwnerAccess: jest.fn().mockResolvedValue(new Set()), checkAlbumOwnerAccess: jest.fn().mockResolvedValue(new Set()), checkCreateAccess: jest.fn().mockResolvedValue(new Set()), }, asset: { checkOwnerAccess: jest.fn().mockResolvedValue(new Set()), checkAlbumAccess: jest.fn().mockResolvedValue(new Set()), checkPartnerAccess: jest.fn().mockResolvedValue(new Set()), checkSharedLinkAccess: jest.fn().mockResolvedValue(new Set()), }, album: { checkOwnerAccess: jest.fn().mockResolvedValue(new Set()), checkSharedAlbumAccess: jest.fn().mockResolvedValue(new Set()), checkSharedLinkAccess: jest.fn().mockResolvedValue(new Set()), }, authDevice: { checkOwnerAccess: jest.fn().mockResolvedValue(new Set()), }, library: { checkOwnerAccess: jest.fn().mockResolvedValue(new Set()), }, timeline: { checkPartnerAccess: jest.fn().mockResolvedValue(new Set()), }, person: { checkFaceOwnerAccess: jest.fn().mockResolvedValue(new Set()), checkOwnerAccess: jest.fn().mockResolvedValue(new Set()), }, partner: { checkUpdateAccess: jest.fn().mockResolvedValue(new Set()), }, }; };