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