From d6f939ac0992af0c4a9ef9ca5231c74fc667b331 Mon Sep 17 00:00:00 2001 From: Sun XingBo Date: Thu, 22 Jul 2021 13:14:01 +0800 Subject: [PATCH] Modify the call of JSONMarshal in the unit test --- client/httplib/httplib_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/httplib/httplib_test.go b/client/httplib/httplib_test.go index 1f30a778..58e5a994 100644 --- a/client/httplib/httplib_test.go +++ b/client/httplib/httplib_test.go @@ -437,12 +437,12 @@ func TestBeegoHTTPRequestXMLBody(t *testing.T) { func TestBeegoHTTPRequestResponseForValue(t *testing.T) { } -func TestBeegoHTTPRequestMarshal(t *testing.T) { +func TestBeegoHTTPRequestJSONMarshal(t *testing.T) { req := Post("http://beego.me") req.SetEscapeHTML(false) body := map[string]interface{} { "escape": "left&right", } - b, _ := req.Marshal(body) + b, _ := req.JSONMarshal(body) assert.Equal(t,fmt.Sprintf(`{"escape":"left&right"}%s`, "\n"), string(b)) }