Skip to content

Commit 910661e

Browse files
authored
chore: remove unused mocks (#19299)
1 parent c8a135a commit 910661e

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

server/src/services/duplicate.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ describe(SearchService.name, () => {
151151
},
152152
});
153153
const id = assetStub.livePhotoMotionAsset.id;
154-
mocks.asset.getById.mockResolvedValue(assetStub.livePhotoMotionAsset);
155154

156155
const result = await sut.handleSearchDuplicates({ id });
157156

158157
expect(result).toBe(JobStatus.SKIPPED);
158+
expect(mocks.assetJob.getForSearchDuplicatesJob).not.toHaveBeenCalled();
159159
});
160160

161161
it('should skip if duplicate detection is disabled', async () => {
@@ -168,11 +168,11 @@ describe(SearchService.name, () => {
168168
},
169169
});
170170
const id = assetStub.livePhotoMotionAsset.id;
171-
mocks.asset.getById.mockResolvedValue(assetStub.livePhotoMotionAsset);
172171

173172
const result = await sut.handleSearchDuplicates({ id });
174173

175174
expect(result).toBe(JobStatus.SKIPPED);
175+
expect(mocks.assetJob.getForSearchDuplicatesJob).not.toHaveBeenCalled();
176176
});
177177

178178
it('should fail if asset is not found', async () => {

server/src/services/library.service.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,8 +1113,6 @@ describe(LibraryService.name, () => {
11131113
mocks.library.get.mockResolvedValue(library);
11141114
mocks.library.streamAssetIds.mockReturnValue(makeStream([assetStub.image1]));
11151115

1116-
mocks.asset.getById.mockResolvedValue(assetStub.image1);
1117-
11181116
await expect(sut.handleDeleteLibrary({ id: library.id })).resolves.toBe(JobStatus.SUCCESS);
11191117
});
11201118
});

server/src/services/notification.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ describe(NotificationService.name, () => {
268268
mocks.album.getById.mockResolvedValue(albumStub.empty);
269269

270270
await expect(sut.handleAlbumInvite({ id: '', recipientId: '' })).resolves.toBe(JobStatus.SKIPPED);
271-
expect(mocks.asset.getById).not.toHaveBeenCalled();
271+
expect(mocks.job.queue).not.toHaveBeenCalled();
272272
});
273273

274274
it('should skip if the recipient has email notifications disabled', async () => {

0 commit comments

Comments
 (0)