test resty commented

This commit is contained in:
yedongfu 2021-07-16 11:38:44 +08:00
parent 193f54e7f3
commit a3551fdfb4

View File

@ -79,11 +79,11 @@ func TestGin(t *testing.T) {
assert.Equal(t, "{\"code\":500,\"message\":\"err1\"}", getResultString("/api/error", strings.NewReader("{}"))) assert.Equal(t, "{\"code\":500,\"message\":\"err1\"}", getResultString("/api/error", strings.NewReader("{}")))
} }
func TestResty(t *testing.T) { // func TestResty(t *testing.T) {
resp, err := RestyClient.R().Get("http://taobao.com") // resp, err := RestyClient.R().Get("http://taobao.com")
assert.Equal(t, nil, err) // assert.Equal(t, nil, err)
err2 := CatchP(func() { // err2 := CatchP(func() {
CheckRestySuccess(resp, err) // CheckRestySuccess(resp, err)
}) // })
assert.NotEqual(t, nil, err2) // assert.NotEqual(t, nil, err2)
} // }