1
0
mirror of https://github.com/beego/bee.git synced 2024-11-26 06:21:34 +00:00

update the default test file tests/default_test.go

This commit is contained in:
Jeffrey Wu 2018-11-23 16:17:11 +08:00
parent e3e401cadd
commit 0e342ff4c1
2 changed files with 6 additions and 6 deletions

View File

@ -511,9 +511,9 @@ import (
) )
func init() { func init() {
_, file, _, _ := runtime.Caller(1) appPath, _ := filepath.Abs("..")
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator)))) beego.TestBeegoInit(appPath)
beego.TestBeegoInit(apppath) beego.AppPath = appPath
} }
// TestGet is a sample to run an endpoint test // TestGet is a sample to run an endpoint test

View File

@ -101,9 +101,9 @@ import (
) )
func init() { func init() {
_, file, _, _ := runtime.Caller(1) appPath, _ := filepath.Abs("..")
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator)))) beego.TestBeegoInit(appPath)
beego.TestBeegoInit(apppath) beego.AppPath = appPath
} }