api/tests: test bodies for equality even if status codes are different

When developing tests it's nice to see all the differences at once.
This commit is contained in:
Ondřej Budai 2019-11-13 14:03:08 +01:00 committed by Lars Karlitski
parent 1fac27527b
commit 2cb7c8936e

View file

@ -115,7 +115,6 @@ func testRoute(t *testing.T, api *weldr.API, external bool, method, path, body s
if resp.StatusCode != expectedStatus {
t.Errorf("%s: expected status %v, but got %v", path, expectedStatus, resp.StatusCode)
return
}
replyJSON, err := ioutil.ReadAll(resp.Body)