Skip to content

Commit 0b1e6a0

Browse files
author
Dirk Nilius
committed
add missing test case to APIGatewayV2CustomAuthorizerSimpleResponse:Context
1 parent b6f1426 commit 0b1e6a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

events/apigw_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ func TestAPIGatewayV2CustomAuthorizerSimpleResponseMarshalling(t *testing.T) {
186186
{"defaults", APIGatewayV2CustomAuthorizerSimpleResponse{}, `{"isAuthorized":false}`},
187187
{"without context", APIGatewayV2CustomAuthorizerSimpleResponse{IsAuthorized: true}, `{"isAuthorized":true}`},
188188
{"context is nil", APIGatewayV2CustomAuthorizerSimpleResponse{Context: nil}, `{"isAuthorized":false}`},
189+
{"context is empty", APIGatewayV2CustomAuthorizerSimpleResponse{Context: map[string]interface{}{}}, `{"isAuthorized":false}`},
189190
{"context with basic types", APIGatewayV2CustomAuthorizerSimpleResponse{Context: map[string]interface{}{"string": "value", "bool": true, "number": 1234}}, `{"isAuthorized":false,"context":{"string":"value","bool":true,"number":1234}}`},
190191
{"context with array", APIGatewayV2CustomAuthorizerSimpleResponse{Context: map[string]interface{}{"array": []string{"value1", "value2"}}}, `{"isAuthorized":false,"context":{"array":["value1","value2"]}}`},
191192
{"context with map", APIGatewayV2CustomAuthorizerSimpleResponse{Context: map[string]interface{}{"map": map[string]string{"key": "value"}}}, `{"isAuthorized":false,"context":{"map":{"key":"value"}}}`},

0 commit comments

Comments
 (0)