Skip to content

Commit

Permalink
feat(cb2-8087): adds v3 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
shivangidas committed Jul 26, 2023
1 parent e308dff commit 849530e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/functions/functionalConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const functionConfig: { [key: string]: NonEmptyArray<IApiAccess> } = {
path: "reference/*",
},
{
verbs: ["POST", "PUT", "OPTIONS"],
verbs: ["POST", "PUT", "PATCH", "OPTIONS"],
path: "v3/technical-records/*",
},
],
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/functions/authoriser.unitTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ describe("authorizer() unit tests", () => {
const returnValue: APIGatewayAuthorizerResult = await authorizer(event, exampleContext());

expect(returnValue.principalId).toEqual(jwtJson.payload.sub);
expect(returnValue.policyDocument.Statement.length).toEqual(12);
expect(returnValue.policyDocument.Statement.length).toEqual(13);
});

it("should return an accurate policy based on functional roles", async () => {
Expand All @@ -131,7 +131,7 @@ describe("authorizer() unit tests", () => {
const returnValue: APIGatewayAuthorizerResult = await authorizer(event, exampleContext());

expect(returnValue.principalId).toEqual(jwtJson.payload.sub);
expect(returnValue.policyDocument.Statement.length).toEqual(12);
expect(returnValue.policyDocument.Statement.length).toEqual(13);

const post: { Action: string; Effect: string; Resource: string } = returnValue.policyDocument.Statement[0] as unknown as { Action: string; Effect: string; Resource: string };
expect(post.Effect).toEqual("Allow");
Expand Down

0 comments on commit 849530e

Please sign in to comment.