refactor(server): remove has asset (#10891)

This commit is contained in:
Jason Rasmussen
2024-07-05 15:10:11 -04:00
committed by GitHub
parent cf88f4b6f8
commit 53d4a5268b
6 changed files with 5 additions and 63 deletions
+2 -2
View File
@@ -270,7 +270,7 @@ describe(AlbumService.name, () => {
accessMock.album.checkOwnerAccess.mockResolvedValue(new Set(['album-4']));
albumMock.getById.mockResolvedValue(albumStub.oneAsset);
albumMock.update.mockResolvedValue(albumStub.oneAsset);
albumMock.hasAsset.mockResolvedValue(false);
albumMock.getAssetIds.mockResolvedValue(new Set());
await expect(
sut.update(authStub.admin, albumStub.oneAsset.id, {
@@ -278,7 +278,7 @@ describe(AlbumService.name, () => {
}),
).rejects.toBeInstanceOf(BadRequestException);
expect(albumMock.hasAsset).toHaveBeenCalledWith({ albumId: 'album-4', assetId: 'not-in-album' });
expect(albumMock.getAssetIds).toHaveBeenCalledWith('album-4', ['not-in-album']);
expect(albumMock.update).not.toHaveBeenCalled();
});