Defer body closing in test (#115)
This commit is contained in:
committed by
Umputun
parent
1b1eb1a847
commit
15ce0c4d6e
@@ -27,6 +27,7 @@ func TestMiddleware_AppInfo(t *testing.T) {
|
||||
resp, err := http.Get(ts.URL + "/blah")
|
||||
require.Nil(t, err)
|
||||
assert.Equal(t, 200, resp.StatusCode)
|
||||
defer resp.Body.Close()
|
||||
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
assert.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user