2023-06-08 15:01:07 +00:00
|
|
|
import { IAccessRepository } from '@app/domain';
|
2023-06-06 20:18:38 +00:00
|
|
|
|
2023-06-28 13:56:24 +00: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 20:18:38 +00:00
|
|
|
return {
|
2023-06-28 13:56:24 +00:00
|
|
|
asset: {
|
|
|
|
hasOwnerAccess: jest.fn(),
|
|
|
|
hasAlbumAccess: jest.fn(),
|
|
|
|
hasPartnerAccess: jest.fn(),
|
|
|
|
hasSharedLinkAccess: jest.fn(),
|
|
|
|
},
|
2023-06-21 01:08:43 +00:00
|
|
|
|
2023-06-28 13:56:24 +00:00
|
|
|
album: {
|
|
|
|
hasOwnerAccess: jest.fn(),
|
|
|
|
hasSharedAlbumAccess: jest.fn(),
|
|
|
|
hasSharedLinkAccess: jest.fn(),
|
|
|
|
},
|
2023-06-21 01:08:43 +00:00
|
|
|
|
2023-06-28 13:56:24 +00:00
|
|
|
library: {
|
|
|
|
hasPartnerAccess: jest.fn(),
|
|
|
|
},
|
2023-06-06 20:18:38 +00:00
|
|
|
};
|
|
|
|
};
|