mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 01:11:36 +03:00
fix(server): Allow negative rating (for rejected images) (#15699)
Allow negative rating (for rejected images)
This commit is contained in:
@@ -1162,6 +1162,17 @@ describe(MetadataService.name, () => {
|
||||
}),
|
||||
);
|
||||
});
|
||||
it('should handle valid negative rating value', async () => {
|
||||
assetMock.getByIds.mockResolvedValue([assetStub.image]);
|
||||
mockReadTags({ Rating: -1 });
|
||||
|
||||
await sut.handleMetadataExtraction({ id: assetStub.image.id });
|
||||
expect(assetMock.upsertExif).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
rating: -1,
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('handleQueueSidecar', () => {
|
||||
|
||||
Reference in New Issue
Block a user