Skip to content

Commit f9b3690

Browse files
author
Mohammed Ehab
committed
Adding Tests
1 parent 3de2206 commit f9b3690

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

lambdacontext/context_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package lambdacontext
2+
3+
import (
4+
"encoding/json"
5+
"testing"
6+
7+
"github.com/stretchr/testify/assert"
8+
)
9+
10+
func TestClientContextUnmarshalJSON_InvalidJSON(t *testing.T) {
11+
var cc ClientContext
12+
err := json.Unmarshal([]byte(`not valid json`), &cc)
13+
assert.Error(t, err)
14+
assert.Empty(t, cc.Custom)
15+
}

0 commit comments

Comments
 (0)