internal/test: return in TestRouteWithReply on empty body
Check if the response is empty, and return instead of continuing.
This commit is contained in:
parent
fd4a3a941a
commit
d3dd83aceb
1 changed files with 1 additions and 0 deletions
|
|
@ -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 == "?" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue