fix: don't flush status immediately

Closes: #148

Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
This commit is contained in:
pancho horrillo
2021-01-11 17:54:54 +01:00
parent 5dbfee40eb
commit ec227c2ba3
6 changed files with 34 additions and 12 deletions
+1 -1
View File
@@ -1319,7 +1319,7 @@ func TestSetResponseStatusSetsGivenStatus(t *testing.T) {
setResponseStatus(w, r, &h)
res := hw.Result()
if res.StatusCode != http.StatusTeapot {
if h.Status != http.StatusTeapot {
t.Errorf("Status code mismatch. Expected: 418, Got: %d", res.StatusCode)
}
}