Skip to content

Commit

Permalink
Migrate find case
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Apr 13, 2021
1 parent ab69965 commit a105b59
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 442 deletions.
99 changes: 0 additions & 99 deletions x-pack/plugins/cases/server/routes/api/cases/find_cases.test.ts

This file was deleted.

15 changes: 15 additions & 0 deletions x-pack/test/case_api_integration/common/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,3 +799,18 @@ export const getCase = async (

return theCase;
};

export const findCases = async (
supertest: st.SuperTest<supertestAsPromised.Test>,
query: Record<string, unknown> = {},
expectedHttpCode: number = 200
): Promise<CasesFindResponse> => {
const { body: res } = await supertest
.get(`${CASES_URL}/_find`)
.query({ sortOrder: 'asc', ...query })
.set('kbn-xsrf', 'true')
.send()
.expect(expectedHttpCode);

return res;
};
Loading

0 comments on commit a105b59

Please sign in to comment.