forked from mirror/gin
Improve errors code coverage (#944)
This commit is contained in:
parent
4a2b55037f
commit
9ff8786b3d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue