1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-01 04:00:18 +00:00
This commit is contained in:
astaxie
2015-10-12 21:26:18 +08:00
parent 4ba50e5df5
commit 912abe3272
2 changed files with 13 additions and 1 deletions

View File

@ -333,6 +333,18 @@ func TestRouterHandler(t *testing.T) {
}
}
func TestRouterHandlerAll(t *testing.T) {
r, _ := http.NewRequest("POST", "/sayhi/a/b/c", nil)
w := httptest.NewRecorder()
handler := NewControllerRegister()
handler.Handler("/sayhi", http.HandlerFunc(sayhello), true)
handler.ServeHTTP(w, r)
if w.Body.String() != "sayhello" {
t.Errorf("TestRouterHandler can't run")
}
}
//
// Benchmarks NewApp:
//