From 74b7d354947cf3c198b48c72da74c2c945f4235e Mon Sep 17 00:00:00 2001 From: "Owen Corrigan (BJSS, VTM)" <122352145+owen-corrigan-bjss@users.noreply.github.com> Date: Thu, 15 Feb 2024 10:39:12 +0000 Subject: [PATCH] feat(cb2-10672): adr certificate generation is available when a pass result is selected for adr contingency tests (#106) --- src/handler/adrCertificate.ts | 2 +- tests/unit/handler/adrCertificate.unit.test.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/handler/adrCertificate.ts b/src/handler/adrCertificate.ts index c4bc9c2e..a9749e03 100644 --- a/src/handler/adrCertificate.ts +++ b/src/handler/adrCertificate.ts @@ -105,7 +105,7 @@ export const handler = async (event: APIGatewayProxyEvent): Promise { body: JSON.stringify(payload), } as unknown as APIGatewayProxyEvent); expect(mockAddToSqs).toHaveBeenCalledWith(expectedSqsPayload, expect.anything()); - expect(res).toEqual({ - statusCode: 200, - body: JSON.stringify('ADR certificate generation successful'), - headers, - }); + expect(JSON.parse(res.body)).toEqual(expect.objectContaining({ message: 'ADR certificate generation successful' })); }); }); });