Skip to content

Commit

Permalink
feat(cb2-10672): adr certificate generation is available when a pass …
Browse files Browse the repository at this point in the history
…result is selected for adr contingency tests (#106)
  • Loading branch information
owen-corrigan authored Feb 15, 2024
1 parent a92128b commit 74b7d35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/handler/adrCertificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const handler = async (event: APIGatewayProxyEvent): Promise<APIGatewayPr

return addHttpHeaders({
statusCode: 200,
body: JSON.stringify('ADR certificate generation successful'),
body: JSON.stringify({ message: 'ADR certificate generation successful', id: newAdrCertificate.certificateId }),
});
} catch (e) {
logger.error(`Error has been thrown with ${JSON.stringify(e)}`);
Expand Down
6 changes: 1 addition & 5 deletions tests/unit/handler/adrCertificate.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ describe('Test adr cert gen lambda', () => {
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' }));
});
});
});

0 comments on commit 74b7d35

Please sign in to comment.