银豹api增加分类
This commit is contained in:
55
platformapi/yinbaoapi/store_page_test.go
Normal file
55
platformapi/yinbaoapi/store_page_test.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package yinbaoapi
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
func TestCreateCategoryUid(t *testing.T) {
|
||||
result, err := api.CreateCategoryUid()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestLoadSubStoresByUserIdDDLJson(t *testing.T) {
|
||||
result, err := api.LoadSubStoresByUserIdDDLJson()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestAddNewCategory(t *testing.T) {
|
||||
_, err := api.AddNewCategory(MainStoreVendorOrgCode, "测试2", "测试分类2")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestUpdateCategory(t *testing.T) {
|
||||
err := api.UpdateCategory(MainStoreVendorOrgCode, "1585030864115972859", "叶菜3", "蔬菜")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestDeleteCategory(t *testing.T) {
|
||||
err := api.DeleteCategory(MainStoreVendorOrgCode, []string{"1585030864115972859"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestLoadCategorysWithOption(t *testing.T) {
|
||||
result, err := api.LoadCategorysWithOption(MainStoreVendorOrgCode)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
Reference in New Issue
Block a user