test/helpers: mark TestRoute() as a helper function

This makes the calling function/location appear when a test fails.
This commit is contained in:
Lars Karlitski 2020-04-23 14:03:49 +02:00 committed by Tom Gundersen
parent 9315ccb88e
commit 5c019cd092

View file

@ -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")