import { AccessCore, IAccessRepository } from '@app/domain'; export interface IAccessRepositoryMock { activity: jest.Mocked; asset: jest.Mocked; album: jest.Mocked; authDevice: jest.Mocked; library: jest.Mocked; timeline: jest.Mocked; person: jest.Mocked; } export const newAccessRepositoryMock = (reset = true): IAccessRepositoryMock => { if (reset) { AccessCore.reset(); } return { activity: { hasOwnerAccess: jest.fn(), hasAlbumOwnerAccess: jest.fn(), hasCreateAccess: jest.fn(), }, asset: { hasOwnerAccess: jest.fn(), hasAlbumAccess: jest.fn(), hasPartnerAccess: jest.fn(), hasSharedLinkAccess: jest.fn(), }, album: { hasOwnerAccess: jest.fn(), hasSharedAlbumAccess: jest.fn(), hasSharedLinkAccess: jest.fn(), }, authDevice: { hasOwnerAccess: jest.fn(), }, library: { hasOwnerAccess: jest.fn(), hasPartnerAccess: jest.fn(), }, timeline: { hasPartnerAccess: jest.fn(), }, person: { hasOwnerAccess: jest.fn(), }, }; };