test: expose performRequest func (#3012)

This commit is contained in:
Bo-Yi Wu
2022-01-02 19:07:44 +08:00
committed by GitHub
parent 01363191be
commit 94153d1e19
9 changed files with 115 additions and 120 deletions
+2 -2
View File
@@ -80,11 +80,11 @@ func performRequestInGroup(t *testing.T, method string) {
panic("unknown method")
}
w := performRequest(router, method, "/v1/login/test")
w := PerformRequest(router, method, "/v1/login/test")
assert.Equal(t, http.StatusBadRequest, w.Code)
assert.Equal(t, "the method was "+method+" and index 3", w.Body.String())
w = performRequest(router, method, "/v1/test")
w = PerformRequest(router, method, "/v1/test")
assert.Equal(t, http.StatusBadRequest, w.Code)
assert.Equal(t, "the method was "+method+" and index 1", w.Body.String())
}