Improve errors code coverage

This commit is contained in:
Eason Lin 2017-06-12 18:30:00 +08:00 committed by easonlin
parent 53799774f4
commit 1e6f3827bd

View File

@ -54,6 +54,13 @@ func TestError(t *testing.T) {
"status": "200",
"data": "some data",
})
type customError struct {
status string
data string
}
err.SetMeta(customError{status: "200", data: "other data"})
assert.Equal(t, err.JSON(), customError{status: "200", data: "other data"})
}
func TestErrorSlice(t *testing.T) {