Skip to content

Commit

Permalink
Improve errors code coverage (gin-gonic#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
easonlin404 authored and appleboy committed Jun 13, 2017
1 parent 4a2b550 commit 9ff8786
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9ff8786

Please sign in to comment.