test/helpers: mark TestRoute() as a helper function
This makes the calling function/location appear when a test fails.
This commit is contained in:
parent
9315ccb88e
commit
5c019cd092
1 changed files with 2 additions and 0 deletions
|
|
@ -101,6 +101,8 @@ func dropFields(obj interface{}, fields ...string) {
|
|||
}
|
||||
|
||||
func TestRoute(t *testing.T, api API, external bool, method, path, body string, expectedStatus int, expectedJSON string, ignoreFields ...string) {
|
||||
t.Helper()
|
||||
|
||||
resp := SendHTTP(api, external, method, path, body)
|
||||
if resp == nil {
|
||||
t.Skip("This test is for internal testing only")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue