mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
test: correct service spec
This commit is contained in:
@@ -76,7 +76,7 @@ export class IntegrityRepository {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
items: items.slice(0, pagination.limit),
|
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 () => {
|
it('gets report', async () => {
|
||||||
mocks.integrityReport.getIntegrityReports.mockResolvedValue({
|
mocks.integrityReport.getIntegrityReports.mockResolvedValue({
|
||||||
items: [],
|
items: [],
|
||||||
hasNextPage: false,
|
nextCursor: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
await expect(sut.getIntegrityReport({ type: IntegrityReportType.ChecksumFail })).resolves.toEqual({
|
await expect(sut.getIntegrityReport({ type: IntegrityReportType.ChecksumFail })).resolves.toEqual({
|
||||||
items: [],
|
items: [],
|
||||||
hasNextPage: false,
|
nextCursor: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(mocks.integrityReport.getIntegrityReports).toHaveBeenCalledWith(
|
expect(mocks.integrityReport.getIntegrityReports).toHaveBeenCalledWith(
|
||||||
{ page: 1, size: 100 },
|
{ cursor: undefined, limit: 100 },
|
||||||
IntegrityReportType.ChecksumFail,
|
IntegrityReportType.ChecksumFail,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user