35 lines
721 B
Go
35 lines
721 B
Go
package ebai
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
|
|
|
"git.rosy.net.cn/baseapi/utils"
|
|
"git.rosy.net.cn/jx-callback/business/model/dao"
|
|
)
|
|
|
|
func TestReadStore(t *testing.T) {
|
|
result, err := CurPurchaseHandler.ReadStore(jxcontext.AdminCtx, "", testShopBaiduID)
|
|
if err != nil {
|
|
t.Fatal(err.Error())
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|
|
|
|
func TestUpdateStore(t *testing.T) {
|
|
db := dao.GetDB()
|
|
err := CurPurchaseHandler.UpdateStore(db, testShopID, "autotest")
|
|
if err != nil {
|
|
t.Fatal(err.Error())
|
|
}
|
|
}
|
|
|
|
func TestCreateStore(t *testing.T) {
|
|
db := dao.GetDB()
|
|
_, err := CurPurchaseHandler.CreateStore(db, 1, "autotest")
|
|
if err != nil {
|
|
t.Fatal(err.Error())
|
|
}
|
|
}
|