mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
chore: remove unused mocks (#19299)
This commit is contained in:
parent
c8a135a7ae
commit
910661e75c
@ -151,11 +151,11 @@ describe(SearchService.name, () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const id = assetStub.livePhotoMotionAsset.id;
|
const id = assetStub.livePhotoMotionAsset.id;
|
||||||
mocks.asset.getById.mockResolvedValue(assetStub.livePhotoMotionAsset);
|
|
||||||
|
|
||||||
const result = await sut.handleSearchDuplicates({ id });
|
const result = await sut.handleSearchDuplicates({ id });
|
||||||
|
|
||||||
expect(result).toBe(JobStatus.SKIPPED);
|
expect(result).toBe(JobStatus.SKIPPED);
|
||||||
|
expect(mocks.assetJob.getForSearchDuplicatesJob).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should skip if duplicate detection is disabled', async () => {
|
it('should skip if duplicate detection is disabled', async () => {
|
||||||
@ -168,11 +168,11 @@ describe(SearchService.name, () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const id = assetStub.livePhotoMotionAsset.id;
|
const id = assetStub.livePhotoMotionAsset.id;
|
||||||
mocks.asset.getById.mockResolvedValue(assetStub.livePhotoMotionAsset);
|
|
||||||
|
|
||||||
const result = await sut.handleSearchDuplicates({ id });
|
const result = await sut.handleSearchDuplicates({ id });
|
||||||
|
|
||||||
expect(result).toBe(JobStatus.SKIPPED);
|
expect(result).toBe(JobStatus.SKIPPED);
|
||||||
|
expect(mocks.assetJob.getForSearchDuplicatesJob).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should fail if asset is not found', async () => {
|
it('should fail if asset is not found', async () => {
|
||||||
|
@ -1113,8 +1113,6 @@ describe(LibraryService.name, () => {
|
|||||||
mocks.library.get.mockResolvedValue(library);
|
mocks.library.get.mockResolvedValue(library);
|
||||||
mocks.library.streamAssetIds.mockReturnValue(makeStream([assetStub.image1]));
|
mocks.library.streamAssetIds.mockReturnValue(makeStream([assetStub.image1]));
|
||||||
|
|
||||||
mocks.asset.getById.mockResolvedValue(assetStub.image1);
|
|
||||||
|
|
||||||
await expect(sut.handleDeleteLibrary({ id: library.id })).resolves.toBe(JobStatus.SUCCESS);
|
await expect(sut.handleDeleteLibrary({ id: library.id })).resolves.toBe(JobStatus.SUCCESS);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -268,7 +268,7 @@ describe(NotificationService.name, () => {
|
|||||||
mocks.album.getById.mockResolvedValue(albumStub.empty);
|
mocks.album.getById.mockResolvedValue(albumStub.empty);
|
||||||
|
|
||||||
await expect(sut.handleAlbumInvite({ id: '', recipientId: '' })).resolves.toBe(JobStatus.SKIPPED);
|
await expect(sut.handleAlbumInvite({ id: '', recipientId: '' })).resolves.toBe(JobStatus.SKIPPED);
|
||||||
expect(mocks.asset.getById).not.toHaveBeenCalled();
|
expect(mocks.job.queue).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should skip if the recipient has email notifications disabled', async () => {
|
it('should skip if the recipient has email notifications disabled', async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user