This commit is contained in:
astaxie 2013-12-24 00:11:13 +08:00
parent 3492059429
commit b103a8a3a2
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ import (
// TestGet is a sample to run an endpoint test // TestGet is a sample to run an endpoint test
func TestGet(t *testing.T) { func TestGet(t *testing.T) {
r, _ := http.NewRequest("GET", "/", nil) r, _ := http.NewRequest("GET", "/object", nil)
w := httptest.NewRecorder() w := httptest.NewRecorder()
beego.BeeApp.Handlers.ServeHTTP(w, r) beego.BeeApp.Handlers.ServeHTTP(w, r)

2
new.go
View File

@ -184,7 +184,7 @@ import (
// TestMain is a sample to run an endpoint test // TestMain is a sample to run an endpoint test
func TestMain(t *testing.T) { func TestMain(t *testing.T) {
r, _ := http.NewRequest("GET", "/object", nil) r, _ := http.NewRequest("GET", "/", nil)
w := httptest.NewRecorder() w := httptest.NewRecorder()
beego.BeeApp.Handlers.ServeHTTP(w, r) beego.BeeApp.Handlers.ServeHTTP(w, r)