mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: album remove asset bug (#10687)
* fix: album remove asset bug * trigger GH Action --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
6ebae3c84f
commit
24c1855899
7 changed files with 44 additions and 46 deletions
|
|
@ -193,15 +193,6 @@ describe(MemoryService.name, () => {
|
|||
expect(memoryMock.removeAssetIds).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should require asset access', async () => {
|
||||
accessMock.memory.checkOwnerAccess.mockResolvedValue(new Set(['memory1']));
|
||||
memoryMock.getAssetIds.mockResolvedValue(new Set(['asset1']));
|
||||
await expect(sut.removeAssets(authStub.admin, 'memory1', { ids: ['asset1'] })).resolves.toEqual([
|
||||
{ error: 'no_permission', id: 'asset1', success: false },
|
||||
]);
|
||||
expect(memoryMock.removeAssetIds).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should remove assets', async () => {
|
||||
accessMock.memory.checkOwnerAccess.mockResolvedValue(new Set(['memory1']));
|
||||
accessMock.asset.checkOwnerAccess.mockResolvedValue(new Set(['asset1']));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue