From d54736d8776f6985958423536c24bda1b7175734 Mon Sep 17 00:00:00 2001 From: adcoelho Date: Tue, 20 Jun 2023 14:48:46 +0200 Subject: [PATCH] Addressing PR comments. --- x-pack/plugins/cases/server/client/cases/find.test.ts | 2 +- .../security_and_spaces/tests/common/cases/find_cases.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/cases/server/client/cases/find.test.ts b/x-pack/plugins/cases/server/client/cases/find.test.ts index 689529f33454c..968f111b58516 100644 --- a/x-pack/plugins/cases/server/client/cases/find.test.ts +++ b/x-pack/plugins/cases/server/client/cases/find.test.ts @@ -105,7 +105,7 @@ describe('find', () => { ); }); - it(`invalid category array with > ${MAX_CATEGORY_FILTER_LENGTH} items`, async () => { + it(`throws an error when the category array has ${MAX_CATEGORY_FILTER_LENGTH} items`, async () => { const category = Array(MAX_CATEGORY_FILTER_LENGTH + 1).fill('foobar'); const findRequest = createCasesClientMockFindRequest({ category }); diff --git a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/cases/find_cases.ts b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/cases/find_cases.ts index bfea368604766..00bdaa5b25f0b 100644 --- a/x-pack/test/cases_api_integration/security_and_spaces/tests/common/cases/find_cases.ts +++ b/x-pack/test/cases_api_integration/security_and_spaces/tests/common/cases/find_cases.ts @@ -349,7 +349,7 @@ export default ({ getService }: FtrProviderContext): void => { }); }); - it('unhappy path - 400s when bad category field supplied', async () => { + it('unhappy path - 400s when more than the maximum category fields are supplied', async () => { const category = Array(MAX_CATEGORY_FILTER_LENGTH + 1).fill('foobar'); await findCases({ supertest, query: { category }, expectedHttpCode: 400 });