2023-06-08 17:01:07 +02:00
|
|
|
import { IAccessRepository } from '@app/domain';
|
2023-06-06 22:18:38 +02:00
|
|
|
|
2023-08-24 21:28:50 +02:00
|
|
|
export interface IAccessRepositoryMock {
|
2023-06-28 15:56:24 +02:00
|
|
|
asset: jest.Mocked<IAccessRepository['asset']>;
|
|
|
|
album: jest.Mocked<IAccessRepository['album']>;
|
|
|
|
library: jest.Mocked<IAccessRepository['library']>;
|
2023-09-18 23:22:44 +02:00
|
|
|
person: jest.Mocked<IAccessRepository['person']>;
|
2023-08-24 21:28:50 +02:00
|
|
|
}
|
2023-06-28 15:56:24 +02:00
|
|
|
|
|
|
|
export const newAccessRepositoryMock = (): IAccessRepositoryMock => {
|
2023-06-06 22:18:38 +02:00
|
|
|
return {
|
2023-06-28 15:56:24 +02:00
|
|
|
asset: {
|
|
|
|
hasOwnerAccess: jest.fn(),
|
|
|
|
hasAlbumAccess: jest.fn(),
|
|
|
|
hasPartnerAccess: jest.fn(),
|
|
|
|
hasSharedLinkAccess: jest.fn(),
|
|
|
|
},
|
2023-06-21 03:08:43 +02:00
|
|
|
|
2023-06-28 15:56:24 +02:00
|
|
|
album: {
|
|
|
|
hasOwnerAccess: jest.fn(),
|
|
|
|
hasSharedAlbumAccess: jest.fn(),
|
|
|
|
hasSharedLinkAccess: jest.fn(),
|
|
|
|
},
|
2023-06-21 03:08:43 +02:00
|
|
|
|
2023-06-28 15:56:24 +02:00
|
|
|
library: {
|
|
|
|
hasPartnerAccess: jest.fn(),
|
|
|
|
},
|
2023-09-18 23:22:44 +02:00
|
|
|
|
|
|
|
person: {
|
|
|
|
hasOwnerAccess: jest.fn(),
|
|
|
|
},
|
2023-06-06 22:18:38 +02:00
|
|
|
};
|
|
|
|
};
|