diff options
Diffstat (limited to 'manualtesting')
-rw-r--r-- | manualtesting/manual_testing.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/manualtesting/manual_testing.go b/manualtesting/manual_testing.go index 75274a24b..20b7a2dfd 100644 --- a/manualtesting/manual_testing.go +++ b/manualtesting/manual_testing.go @@ -138,18 +138,16 @@ func manualTest(c *api.Context, w http.ResponseWriter, r *http.Request) { // Grab the test ID and pick the test testname, ok := params["test"] - var err2 *model.AppError + if !ok { + c.Err = model.NewAppError("/manual", "manaultesting.manual_test.parse.app_error", nil, "", http.StatusBadRequest) + return + } + switch testname[0] { case "autolink": - err2 = testAutoLink(env) + c.Err = testAutoLink(env) // ADD YOUR NEW TEST HERE! case "general": - err2 = nil - } - - if err != nil { - c.Err = err2 - return } } |