- up
This commit is contained in:
@@ -5,11 +5,12 @@ import (
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
// _ "git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
)
|
||||
|
||||
func TestGetStoreSkusFullInfo(t *testing.T) {
|
||||
skuNameList, err := new(PurchaseHandler).GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, 2, "2523687", nil)
|
||||
skuNameList, err := curPurchaseHandler.GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, 2, "2523687", nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -18,7 +19,14 @@ func TestGetStoreSkusFullInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetStoreSkusBareInfo(t *testing.T) {
|
||||
storeSkuList, err := curPurchaseHandler.GetStoreSkusBareInfo(jxcontext.AdminCtx, nil, 2, "2523687", nil)
|
||||
storeSkuList, err := curPurchaseHandler.GetStoreSkusBareInfo(jxcontext.AdminCtx, nil, 2, "2523687", []*partner.StoreSkuInfo{
|
||||
&partner.StoreSkuInfo{
|
||||
SkuID: 969,
|
||||
},
|
||||
&partner.StoreSkuInfo{
|
||||
SkuID: 1306,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
@@ -39,3 +47,18 @@ func TestDeleteStoreAllCategories(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetStoreCategory(t *testing.T) {
|
||||
_, err := curPurchaseHandler.GetStoreCategory(jxcontext.AdminCtx, 2, "2523687", "不存在的分类")
|
||||
if err == nil {
|
||||
t.Fatal("应该找不到这个分类")
|
||||
}
|
||||
catName := "小月饼"
|
||||
cat, err := curPurchaseHandler.GetStoreCategory(jxcontext.AdminCtx, 2, "2523687", catName)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else if cat.Name != catName {
|
||||
t.Fatal("没有找到正确的商家分类")
|
||||
}
|
||||
t.Log(utils.Format4Output(cat, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user