Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
alextran1502 committed Jan 25, 2025
1 parent 3f73800 commit e3868ff
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/src/services/asset.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,20 @@ describe(AssetService.name, () => {
});
expect(assetMock.updateAll).not.toHaveBeenCalled();
});

it('should update Assets table if isArchived field is provided', async () => {
accessMock.asset.checkOwnerAccess.mockResolvedValue(new Set(['asset-1']));
await sut.updateAll(authStub.admin, {
ids: ['asset-1'],
latitude: 0,
longitude: 0,
isArchived: undefined,
isFavorite: false,
duplicateId: undefined,
rating: undefined,
});
expect(assetMock.updateAll).toHaveBeenCalled();
});
});

describe('deleteAll', () => {
Expand Down

0 comments on commit e3868ff

Please sign in to comment.