- continue refactoring...

This commit is contained in:
gazebo
2018-08-17 16:42:16 +08:00
parent d40186e930
commit c5db19045d
33 changed files with 656 additions and 178 deletions

View File

@@ -7,7 +7,7 @@ import (
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"git.rosy.net.cn/jx-callback/globals/db"
"git.rosy.net.cn/jx-callback/globals/beegodb"
"github.com/astaxie/beego"
)
@@ -16,7 +16,7 @@ func init() {
beego.BConfig.RunMode = "dev" // InitBeegoBeforeTest会将runmode设置为test
globals.Init()
db.Init()
beegodb.Init()
api.Init()
}
@@ -24,7 +24,7 @@ func TestCreateWaybill(t *testing.T) {
orerID := "817109342000022"
order, _ := orderman.CurOrderManager.LoadOrder(orerID, model.VendorIDJD)
// globals.SugarLogger.Debug(order)
c := new(WaybillController)
c := new(DeliveryHandler)
if err := c.CreateWaybill(order); err != nil {
t.Fatal(err.Error())
}
@@ -35,7 +35,7 @@ func TestCancelWaybill(t *testing.T) {
VendorWaybillID: "1532332342088966",
VendorWaybillID2: "55",
}
c := new(WaybillController)
c := new(DeliveryHandler)
if err := c.CancelWaybill(bill); err != nil {
t.Fatal(err.Error())
}