internal/test: return in TestRouteWithReply on empty body

Check if the response is empty, and return instead of continuing.
This commit is contained in:
Sanne Raymaekers 2023-12-06 15:23:41 +01:00 committed by Achilleas Koutsou
parent fd4a3a941a
commit d3dd83aceb

View file

@ -114,6 +114,7 @@ func TestRouteWithReply(t *testing.T, api http.Handler, external bool, method, p
if expectedJSON == "" {
require.Lenf(t, replyJSON, 0, "%s: expected no response body, but got:\n%s", path, replyJSON)
return
}
if expectedJSON == "?" {