Merge remote-tracking branch 'origin/mark' into don
This commit is contained in:
@@ -1 +1,43 @@
|
||||
package feie
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
|
||||
_ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
_ "git.rosy.net.cn/jx-callback/business/jxcallback/scheduler/defsch"
|
||||
"git.rosy.net.cn/jx-callback/globals/testinit"
|
||||
)
|
||||
|
||||
func init() {
|
||||
testinit.Init()
|
||||
}
|
||||
|
||||
func TestGetCityShops(t *testing.T) {
|
||||
orderID := "919864156000342"
|
||||
vendorID := 0
|
||||
order, err := partner.CurOrderManager.LoadOrder(orderID, vendorID)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
context := CurPrinterHandler.getOrderContent(order, "mobile")
|
||||
status, err := CurPrinterHandler.PrintMsg(jxcontext.AdminCtx, "id1", "id2", "title", context)
|
||||
t.Log(utils.Format4Output(status, false))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRegisterPrinter(t *testing.T) {
|
||||
newID1, newID2, err := CurPrinterHandler.RegisterPrinter(jxcontext.AdminCtx, "id1", "id2", "title")
|
||||
t.Log(newID1 + "," + newID2)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user