From 38d6a4d272e2bec8acb686013592f6b4f1a668e4 Mon Sep 17 00:00:00 2001 From: Eason Lin Date: Tue, 11 Jul 2017 12:46:07 +0800 Subject: [PATCH] fix(test): add space between key and value as same as standard JSON. --- context_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context_test.go b/context_test.go index 8284f192..758fecdc 100644 --- a/context_test.go +++ b/context_test.go @@ -582,7 +582,7 @@ func TestContextRenderIndentedJSON(t *testing.T) { c.IndentedJSON(201, H{"foo": "bar", "bar": "foo", "nested": H{"foo": "bar"}}) assert.Equal(t, w.Code, 201) - assert.Equal(t, "{\n \"bar\": \"foo\",\n \"foo\": \"bar\",\n \"nested\":{\n \"foo\": \"bar\"\n }\n}", w.Body.String()) + assert.Equal(t, "{\n \"bar\": \"foo\",\n \"foo\": \"bar\",\n \"nested\": {\n \"foo\": \"bar\"\n }\n}", w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) }