Fixing more warnings in tests.

This commit is contained in:
Aren Patel 2017-08-01 17:45:33 -07:00
parent d94776e6cc
commit a92a3b75d9
No known key found for this signature in database
GPG Key ID: 90489CDA50BCDE34
1 changed files with 2 additions and 2 deletions

View File

@ -256,13 +256,13 @@ func TestEmbeddedMarshalOrder(t *testing.T) {
// unmarshal payloadWithInt to f (Foo) using jsonapi unmarshaler; expecting an error
f := &Foo{}
if err := UnmarshalPayload(bytes.NewReader(payloadWithInt), f); err == nil {
if err = UnmarshalPayload(bytes.NewReader(payloadWithInt), f); err == nil {
t.Errorf("expected an error: int value of 5 should attempt to map to Foo.Name (string) and error")
}
// unmarshal payloadWithString to f (Foo) using jsonapi unmarshaler; expecting no error
f = &Foo{}
if err := UnmarshalPayload(bytes.NewReader(payloadWithString), f); err != nil {
if err = UnmarshalPayload(bytes.NewReader(payloadWithString), f); err != nil {
t.Error(err)
}
if f.Name != "foo" {