- serveral store apis for ebai.
This commit is contained in:
55
platformapi/ebaiapi/shop_test.go
Normal file
55
platformapi/ebaiapi/shop_test.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package ebaiapi
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
func TestShopList(t *testing.T) {
|
||||
result, err := api.ShopList(SysStatusAll)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
}
|
||||
|
||||
func TestShopGet(t *testing.T) {
|
||||
result, err := api.ShopGet("", testShopBaiduID)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
// result, err = api.ShopGet(testShopID, 0)
|
||||
// if err != nil {
|
||||
// t.Fatal(err)
|
||||
// } else {
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
// }
|
||||
}
|
||||
|
||||
func TestShopUpdate(t *testing.T) {
|
||||
params := map[string]interface{}{
|
||||
KeyShopID: testShopID,
|
||||
// KeyName: "hello",
|
||||
"phone": "13812345678",
|
||||
}
|
||||
err := api.ShopUpdate(params)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func TestShopBusStatusGet(t *testing.T) {
|
||||
result, err := api.ShopBusStatusGet(testShopID, 0, PlatformFlagBaidu)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
t.Log(result)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user