This commit is contained in:
holooooo 2021-05-24 11:26:52 +08:00
parent 84fa2ccd9a
commit 162247b8a5

View File

@ -199,6 +199,7 @@ func TestClient_Delete(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer resp.Resp.Body.Close()
assert.NotNil(t, resp) assert.NotNil(t, resp)
assert.Equal(t, http.MethodDelete, resp.Resp.Request.Method) assert.Equal(t, http.MethodDelete, resp.Resp.Request.Method)
} }
@ -214,6 +215,7 @@ func TestClient_Head(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer resp.Resp.Body.Close()
assert.NotNil(t, resp) assert.NotNil(t, resp)
assert.Equal(t, http.MethodHead, resp.Resp.Request.Method) assert.Equal(t, http.MethodHead, resp.Resp.Request.Method)
} }