Chore: Update useReviewWorkflows tests

This commit is contained in:
Gustav Hansen 2023-07-07 12:25:46 +02:00
parent 669c7baae4
commit cecf3026c9
2 changed files with 6 additions and 20 deletions

View File

@ -24,10 +24,6 @@ jest.mock('../../../../../../hooks', () => ({
},
],
},
meta: {
workflowCount: 2,
},
},
})),
}));
@ -44,9 +40,5 @@ describe('useReviewWorkflowLicenseLimits', () => {
workflows: 10,
stagesPerWorkflow: 10,
});
expect(result.current.meta).toStrictEqual({
workflowCount: 2,
});
});
});

View File

@ -26,11 +26,8 @@ const server = setupServer(
},
],
pagination: {
page: 1,
pageSize: 100,
pageCount: 1,
total: 1,
meta: {
workflowCount: 1,
},
})
);
@ -46,11 +43,8 @@ const server = setupServer(
stages: populate === 'stages' ? [STAGE_FIXTURE] : [],
},
pagination: {
page: 1,
pageSize: 100,
pageCount: 1,
total: 1,
meta: {
workflowCount: 1,
},
})
);
@ -94,7 +88,7 @@ describe('useReviewWorkflows', () => {
expect(result.current).toStrictEqual(
expect.objectContaining({
status: 'success',
pagination: expect.objectContaining({ total: 1 }),
meta: expect.objectContaining({ workflowCount: 1 }),
workflows: [{ id: expect.any(Number), stages: expect.any(Array) }],
})
);
@ -107,7 +101,7 @@ describe('useReviewWorkflows', () => {
expect(result.current).toStrictEqual(
expect.objectContaining({
pagination: expect.objectContaining({ total: 1 }),
meta: expect.objectContaining({ workflowCount: 1 }),
workflows: [expect.objectContaining({ id: 1, stages: expect.any(Array) })],
})
);