feat 包命名规范
This commit is contained in:
@@ -3,7 +3,7 @@ package utils
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"git.hlsq.asia/mmorpg/service-common/net/http/http_resp"
|
||||
"git.hlsq.asia/mmorpg/service-common/net/http/httpresp"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"net/http/httptest"
|
||||
@@ -26,7 +26,7 @@ func CreateTestContext(method, path string, body interface{}) (*httptest.Respons
|
||||
}
|
||||
|
||||
// AssertResponse 断言返回值
|
||||
func AssertResponse(ts *suite.Suite, w *httptest.ResponseRecorder, httpCode int, code *http_resp.Code) {
|
||||
func AssertResponse(ts *suite.Suite, w *httptest.ResponseRecorder, httpCode int, code *httpresp.Code) {
|
||||
ts.Assert().Equal(httpCode, w.Code)
|
||||
var response map[string]interface{}
|
||||
ts.Assert().NoError(json.Unmarshal(w.Body.Bytes(), &response))
|
||||
|
||||
Reference in New Issue
Block a user