mirror of
https://github.com/immich-app/immich.git
synced 2026-01-18 15:55:56 -08:00
test: correct service spec
This commit is contained in:
@@ -76,7 +76,7 @@ export class IntegrityRepository {
|
||||
|
||||
return {
|
||||
items: items.slice(0, pagination.limit),
|
||||
nextCursor: items[pagination.limit]?.id,
|
||||
nextCursor: items[pagination.limit]?.id as string | undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -28,16 +28,16 @@ describe(IntegrityService.name, () => {
|
||||
it('gets report', async () => {
|
||||
mocks.integrityReport.getIntegrityReports.mockResolvedValue({
|
||||
items: [],
|
||||
hasNextPage: false,
|
||||
nextCursor: undefined,
|
||||
});
|
||||
|
||||
await expect(sut.getIntegrityReport({ type: IntegrityReportType.ChecksumFail })).resolves.toEqual({
|
||||
items: [],
|
||||
hasNextPage: false,
|
||||
nextCursor: undefined,
|
||||
});
|
||||
|
||||
expect(mocks.integrityReport.getIntegrityReports).toHaveBeenCalledWith(
|
||||
{ page: 1, size: 100 },
|
||||
{ cursor: undefined, limit: 100 },
|
||||
IntegrityReportType.ChecksumFail,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user