Update context_test.go

This commit is contained in:
田欧 2019-05-21 23:34:11 +08:00 committed by GitHub
parent 9198d6acd0
commit c4d8d15551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1272,7 +1272,7 @@ func TestContextAbortWithStatusJSON(t *testing.T) {
_, err := buf.ReadFrom(w.Body) _, err := buf.ReadFrom(w.Body)
assert.NoError(t, err) assert.NoError(t, err)
jsonStringBody := buf.String() jsonStringBody := buf.String()
assert.Equal(t, fmt.Sprint(`{"foo":"fooValue","bar":"barValue"}\\n`), jsonStringBody) assert.Equal(t, fmt.Sprint("{\"foo\":\"fooValue\",\"bar\":\"barValue\"}\n"), jsonStringBody)
} }
func TestContextError(t *testing.T) { func TestContextError(t *testing.T) {