88 "testing"
99
1010 "github.com/aws/aws-lambda-go/events/test"
11+ "github.com/stretchr/testify/assert"
1112)
1213
1314func TestApiGatewayRequestMarshaling (t * testing.T ) {
@@ -38,7 +39,7 @@ func TestApiGatewayRequestMarshaling(t *testing.T) {
3839 t .Errorf ("could not marshal event. details: %v" , err )
3940 }
4041
41- test . AssertJsonsEqual (t , inputJSON , outputJSON )
42+ assert . JSONEq (t , string ( inputJSON ), string ( outputJSON ) )
4243}
4344
4445func TestApiGatewayRequestMalformedJson (t * testing.T ) {
@@ -65,7 +66,7 @@ func TestApiGatewayResponseMarshaling(t *testing.T) {
6566 t .Errorf ("could not marshal event. details: %v" , err )
6667 }
6768
68- test . AssertJsonsEqual (t , inputJSON , outputJSON )
69+ assert . JSONEq (t , string ( inputJSON ), string ( outputJSON ) )
6970}
7071
7172func TestApiGatewayResponseMalformedJson (t * testing.T ) {
@@ -92,7 +93,7 @@ func TestApiGatewayCustomAuthorizerRequestMarshaling(t *testing.T) {
9293 t .Errorf ("could not marshal event. details: %v" , err )
9394 }
9495
95- test . AssertJsonsEqual (t , inputJSON , outputJSON )
96+ assert . JSONEq (t , string ( inputJSON ), string ( outputJSON ) )
9697}
9798
9899func TestApiGatewayCustomAuthorizerRequestTypeRequestMarshaling (t * testing.T ) {
@@ -115,7 +116,7 @@ func TestApiGatewayCustomAuthorizerRequestTypeRequestMarshaling(t *testing.T) {
115116 t .Errorf ("could not marshal event. details: %v" , err )
116117 }
117118
118- test . AssertJsonsEqual (t , inputJSON , outputJSON )
119+ assert . JSONEq (t , string ( inputJSON ), string ( outputJSON ) )
119120}
120121
121122func TestApiGatewayCustomAuthorizerRequestMalformedJson (t * testing.T ) {
@@ -146,7 +147,7 @@ func TestApiGatewayCustomAuthorizerResponseMarshaling(t *testing.T) {
146147 t .Errorf ("could not marshal event. details: %v" , err )
147148 }
148149
149- test . AssertJsonsEqual (t , inputJSON , outputJSON )
150+ assert . JSONEq (t , string ( inputJSON ), string ( outputJSON ) )
150151}
151152
152153func TestApiGatewayCustomAuthorizerResponseMalformedJson (t * testing.T ) {
0 commit comments