- TestRetailBatchInitData

This commit is contained in:
gazebo
2019-03-17 22:18:59 +08:00
parent 26f1d37caf
commit 471f7aeefa

View File

@@ -58,7 +58,7 @@ func TestRetailGetSpTagIds(t *testing.T) {
if len(result) == 0 {
t.Fatal("should have items")
}
// t.Log(utils.Format4Output(result, false))
t.Log(utils.Format4Output(result, false))
}
func TestRetailCatSkuBatchDelete(t *testing.T) {
@@ -74,3 +74,33 @@ func TestRetailDelete(t *testing.T) {
t.Fatal(err)
}
}
func TestRetailBatchInitData(t *testing.T) {
err := api.RetailBatchInitData("2464052", []map[string]interface{}{
map[string]interface{}{
"app_food_code": "23841",
"box_num": 0,
"box_price": 0,
"category_name": "豆制良品🌾🌾",
"description": "",
"is_sold_out": 0,
"min_order_count": 1,
"name": "干腐竹约150g/份",
"picture": "http://image.jxc4.com/5f7fba025fc9348796039423c48ac3f5.jpg",
"price": 1000,
"skus": []map[string]interface{}{
map[string]interface{}{
"price": 1000,
"sku_id": "23841",
"spec": "150g",
"stock": "*",
"upc": "",
},
},
"tag_id": "200000380",
"unit": "份",
},
})
if err != nil {
t.Fatal(err)
}
}