add test file
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
3b0e9fcda2
commit
b7f6b22fb2
18
codec_test.go
Normal file
18
codec_test.go
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package json
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestReadBody(t *testing.T) {
|
||||||
|
s := &struct {
|
||||||
|
Name string
|
||||||
|
}{}
|
||||||
|
c := NewCodec()
|
||||||
|
b := bytes.NewReader(nil)
|
||||||
|
err := c.ReadBody(b, s)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user