1
0
mirror of https://github.com/beego/bee.git synced 2024-11-25 20:10:55 +00:00
This commit is contained in:
astaxie 2016-11-09 20:17:55 +08:00
parent a3c1d42dab
commit f7001294a9

6
new.go
View File

@ -171,13 +171,13 @@ func init() {
}
// TestMain is a sample to run an endpoint test
func TestMain(t *testing.T) {
// TestBeego is a sample to run an endpoint test
func TestBeego(t *testing.T) {
r, _ := http.NewRequest("GET", "/", nil)
w := httptest.NewRecorder()
beego.BeeApp.Handlers.ServeHTTP(w, r)
beego.Trace("testing", "TestMain", "Code[%d]\n%s", w.Code, w.Body.String())
beego.Trace("testing", "TestBeego", "Code[%d]\n%s", w.Code, w.Body.String())
Convey("Subject: Test Station Endpoint\n", t, func() {
Convey("Status Code Should Be 200", func() {