mtwm.curPurchaseHandler改为CurPurchaseHandler
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGetStoreSkusFullInfo(t *testing.T) {
|
||||
skuNameList, err := curPurchaseHandler.GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, 2, "2523687", nil)
|
||||
skuNameList, err := CurPurchaseHandler.GetStoreSkusFullInfo(jxcontext.AdminCtx, nil, 2, "2523687", nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -19,7 +19,7 @@ func TestGetStoreSkusFullInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetStoreSkusBareInfo(t *testing.T) {
|
||||
storeSkuList, err := curPurchaseHandler.GetStoreSkusBareInfo(jxcontext.AdminCtx, nil, 2, "2523687", []*partner.StoreSkuInfo{
|
||||
storeSkuList, err := CurPurchaseHandler.GetStoreSkusBareInfo(jxcontext.AdminCtx, nil, 2, "2523687", []*partner.StoreSkuInfo{
|
||||
&partner.StoreSkuInfo{
|
||||
SkuID: 969,
|
||||
},
|
||||
@@ -35,26 +35,26 @@ func TestGetStoreSkusBareInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDeleteStoreAllSkus(t *testing.T) {
|
||||
err := curPurchaseHandler.DeleteStoreAllSkus(jxcontext.AdminCtx, nil, 2, "2523687", true)
|
||||
err := CurPurchaseHandler.DeleteStoreAllSkus(jxcontext.AdminCtx, nil, 2, "2523687", true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeleteStoreAllCategories(t *testing.T) {
|
||||
err := curPurchaseHandler.DeleteStoreAllCategories(jxcontext.AdminCtx, nil, 2, "2523687", true)
|
||||
err := CurPurchaseHandler.DeleteStoreAllCategories(jxcontext.AdminCtx, nil, 2, "2523687", true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetStoreCategory(t *testing.T) {
|
||||
_, err := curPurchaseHandler.GetStoreCategory(jxcontext.AdminCtx, 2, "2523687", "不存在的分类")
|
||||
_, err := CurPurchaseHandler.GetStoreCategory(jxcontext.AdminCtx, 2, "2523687", "不存在的分类")
|
||||
if err == nil {
|
||||
t.Fatal("应该找不到这个分类")
|
||||
}
|
||||
catName := "小月饼"
|
||||
cat, err := curPurchaseHandler.GetStoreCategory(jxcontext.AdminCtx, 2, "2523687", catName)
|
||||
cat, err := CurPurchaseHandler.GetStoreCategory(jxcontext.AdminCtx, 2, "2523687", catName)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else if cat.Name != catName {
|
||||
|
||||
Reference in New Issue
Block a user