Skip to content

Commit 7f3bcb3

Browse files
committed
adjust mock for ability method
1 parent 0755164 commit 7f3bcb3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/api/src/instrument-records/__tests__/instrument-records.service.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ describe('InstrumentRecordsService', () => {
121121
instrumentRecordModel.findMany.mockResolvedValueOnce(mockRecords);
122122
instrumentsService.findById.mockResolvedValueOnce(mockInstruments[0]);
123123

124-
const result = await instrumentRecordsService.exportRecords();
124+
const ability = { can: () => true } as any;
125+
126+
const result = await instrumentRecordsService.exportRecords({}, { ability });
125127

126128
expect(Array.isArray(result)).toBe(true);
127129
expect(result.length).toBeGreaterThan(0);

0 commit comments

Comments
 (0)