worker/server: extend the route tests a bit
Test the update and upload routes too, for completeness.
This commit is contained in:
parent
5dac422b9c
commit
4a484c8192
2 changed files with 66 additions and 0 deletions
|
|
@ -119,6 +119,10 @@ func TestRoute(t *testing.T, api API, external bool, method, path, body string,
|
|||
require.Lenf(t, replyJSON, 0, "%s: expected no response body, but got:\n%s", path, replyJSON)
|
||||
}
|
||||
|
||||
if expectedJSON == "?" {
|
||||
return
|
||||
}
|
||||
|
||||
var reply, expected interface{}
|
||||
err = json.Unmarshal(replyJSON, &reply)
|
||||
require.NoErrorf(t, err, "%s: json.Unmarshal failed for\n%s", path, string(replyJSON))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue