2023-06-08 10:01:07 -05:00
|
|
|
import { IAccessRepository } from '@app/domain';
|
2023-06-06 15:18:38 -05:00
|
|
|
|
2023-06-28 08:56:24 -05:00
|
|
|
export type IAccessRepositoryMock = {
|
|
|
|
asset: jest.Mocked<IAccessRepository['asset']>;
|
|
|
|
album: jest.Mocked<IAccessRepository['album']>;
|
|
|
|
library: jest.Mocked<IAccessRepository['library']>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const newAccessRepositoryMock = (): IAccessRepositoryMock => {
|
2023-06-06 15:18:38 -05:00
|
|
|
return {
|
2023-06-28 08:56:24 -05:00
|
|
|
asset: {
|
|
|
|
hasOwnerAccess: jest.fn(),
|
|
|
|
hasAlbumAccess: jest.fn(),
|
|
|
|
hasPartnerAccess: jest.fn(),
|
|
|
|
hasSharedLinkAccess: jest.fn(),
|
|
|
|
},
|
2023-06-20 20:08:43 -05:00
|
|
|
|
2023-06-28 08:56:24 -05:00
|
|
|
album: {
|
|
|
|
hasOwnerAccess: jest.fn(),
|
|
|
|
hasSharedAlbumAccess: jest.fn(),
|
|
|
|
hasSharedLinkAccess: jest.fn(),
|
|
|
|
},
|
2023-06-20 20:08:43 -05:00
|
|
|
|
2023-06-28 08:56:24 -05:00
|
|
|
library: {
|
|
|
|
hasPartnerAccess: jest.fn(),
|
|
|
|
},
|
2023-06-06 15:18:38 -05:00
|
|
|
};
|
|
|
|
};
|