acdc66413c
* feat: libraries Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
39 lines
940 B
TypeScript
39 lines
940 B
TypeScript
import { IAccessRepository } from '@app/domain';
|
|
|
|
export interface IAccessRepositoryMock {
|
|
asset: jest.Mocked<IAccessRepository['asset']>;
|
|
album: jest.Mocked<IAccessRepository['album']>;
|
|
library: jest.Mocked<IAccessRepository['library']>;
|
|
timeline: jest.Mocked<IAccessRepository['timeline']>;
|
|
person: jest.Mocked<IAccessRepository['person']>;
|
|
}
|
|
|
|
export const newAccessRepositoryMock = (): IAccessRepositoryMock => {
|
|
return {
|
|
asset: {
|
|
hasOwnerAccess: jest.fn(),
|
|
hasAlbumAccess: jest.fn(),
|
|
hasPartnerAccess: jest.fn(),
|
|
hasSharedLinkAccess: jest.fn(),
|
|
},
|
|
|
|
album: {
|
|
hasOwnerAccess: jest.fn(),
|
|
hasSharedAlbumAccess: jest.fn(),
|
|
hasSharedLinkAccess: jest.fn(),
|
|
},
|
|
|
|
library: {
|
|
hasOwnerAccess: jest.fn(),
|
|
hasPartnerAccess: jest.fn(),
|
|
},
|
|
|
|
timeline: {
|
|
hasPartnerAccess: jest.fn(),
|
|
},
|
|
|
|
person: {
|
|
hasOwnerAccess: jest.fn(),
|
|
},
|
|
};
|
|
};
|