Skip to content

Commit 002b5ae

Browse files
committed
fix tests
1 parent 07f99a1 commit 002b5ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api_tests/decoder_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ package test
22

33
import (
44
"bytes"
5-
"encoding/json"
65
"github.com/stretchr/testify/require"
76
"testing"
7+
"github.com/json-iterator/go"
88
)
99

1010
func Test_disallowUnknownFields(t *testing.T) {
1111
should := require.New(t)
1212
type TestObject struct{}
1313
var obj TestObject
14-
decoder := json.NewDecoder(bytes.NewBufferString(`{"field1":100}`))
14+
decoder := jsoniter.NewDecoder(bytes.NewBufferString(`{"field1":100}`))
1515
decoder.DisallowUnknownFields()
1616
should.Error(decoder.Decode(&obj))
1717
}

0 commit comments

Comments
 (0)