immich/server/test/repositories/album.repository.mock.ts
Daniel Dietzler f1c98ac9e6
fix(server): Error when loading album with deleted owner (#4086)
* soft delete albums when user gets soft deleted

* fix wrong intl openapi version

* fix tests

* ability to restore albums, automatically restore when user restored

* (e2e) tests for shared albums via link and with user

* (e2e) test deletion of users and linked albums

* (e2e) fix share album with owner test

* fix: deletedAt

* chore: fix restore order

* fix: use timezone date column

* chore: cleanup e2e tests

* (e2e) fix user delete test

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
2023-09-18 11:56:50 -04:00

24 lines
636 B
TypeScript

import { IAlbumRepository } from '@app/domain';
export const newAlbumRepositoryMock = (): jest.Mocked<IAlbumRepository> => {
return {
getById: jest.fn(),
getByIds: jest.fn(),
getByAssetId: jest.fn(),
getAssetCountForIds: jest.fn(),
getInvalidThumbnail: jest.fn(),
getOwned: jest.fn(),
getShared: jest.fn(),
getNotShared: jest.fn(),
restoreAll: jest.fn(),
softDeleteAll: jest.fn(),
deleteAll: jest.fn(),
getAll: jest.fn(),
removeAsset: jest.fn(),
hasAsset: jest.fn(),
create: jest.fn(),
update: jest.fn(),
delete: jest.fn(),
updateThumbnails: jest.fn(),
};
};