1515package spec
1616
1717import (
18- "encoding/json"
1918 "testing"
2019
20+ json "github.com/goccy/go-json"
2121 "github.com/stretchr/testify/assert"
2222 "github.com/stretchr/testify/require"
2323)
2424
2525const contactInfoJSON = `{
26- "name": "wordnik api team",
27- "url": "http://developer.wordnik.com",
28- 29- "x-teams": "test team"
26+ "name": "wordnik api team",
27+ "url": "http://developer.wordnik.com",
28+ 29+ "x-teams": "test team"
3030}`
3131
3232var contactInfo = ContactInfo {ContactInfoProps : ContactInfoProps {
@@ -36,9 +36,9 @@ var contactInfo = ContactInfo{ContactInfoProps: ContactInfoProps{
3636}, VendorExtensible : VendorExtensible {Extensions : map [string ]interface {}{"x-teams" : "test team" }}}
3737
3838func TestIntegrationContactInfo (t * testing.T ) {
39- b , err := json .MarshalIndent (contactInfo , "" , "\t " )
39+ b , err := json .MarshalIndent (contactInfo , "" , " " )
4040 require .NoError (t , err )
41- assert .Equal (t , contactInfoJSON , string (b ))
41+ assert .JSONEq (t , contactInfoJSON , string (b ))
4242
4343 actual := ContactInfo {}
4444 err = json .Unmarshal ([]byte (contactInfoJSON ), & actual )
0 commit comments