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, workflows: 10,
stagesPerWorkflow: 10, stagesPerWorkflow: 10,
}); });
expect(result.current.meta).toStrictEqual({
workflowCount: 2,
});
}); });
}); });

View File

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