From 1e6f3827bd3878eabcb5fb31209bef97445f95b8 Mon Sep 17 00:00:00 2001 From: Eason Lin Date: Mon, 12 Jun 2017 18:30:00 +0800 Subject: [PATCH] Improve errors code coverage --- errors_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/errors_test.go b/errors_test.go index c9a3407b..1aa0cdde 100644 --- a/errors_test.go +++ b/errors_test.go @@ -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) {