New error handling added to getRequestBody function in data package

This commit is contained in:
Héctor Hurtado
2019-11-18 15:01:02 +01:00
parent e4b3a4f718
commit 4c7eae8ebb
3 changed files with 5 additions and 5 deletions
+2 -3
View File
@@ -121,9 +121,8 @@ func TestGetRequestBody500sWhenHandlerRequestErrors(t *testing.T) {
getRequestBody(w, r, &h)
res := w.Result()
if res.StatusCode != http.StatusInternalServerError {
t.Error("status not 500")
for _, e := range checkErrorResponse(w.Result(), http.StatusInternalServerError, "Internal Server Error") {
t.Error(e.Error())
}
}