From 64d474b2a207e01c425ef7d2dd9dc78267d2844f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rex=20Lee=28=E6=9D=8E=E4=BF=8A=29?= Date: Mon, 2 Jul 2018 12:04:13 +0800 Subject: [PATCH] change 204 to http.StatusNoContent --- context_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context_test.go b/context_test.go index feded21c..6f37682e 100644 --- a/context_test.go +++ b/context_test.go @@ -690,9 +690,9 @@ func TestContextRenderNoContentAsciiJSON(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.AsciiJSON(204, []string{"lang", "Go语言"}) + c.AsciiJSON(http.StatusNoContent, []string{"lang", "Go语言"}) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "application/json", w.HeaderMap.Get("Content-Type")) }