- store and product api for jd and elm added.

This commit is contained in:
gazebo
2018-08-27 17:22:15 +08:00
parent 8357982612
commit cc7be396ea
7 changed files with 706 additions and 9 deletions

View File

@@ -0,0 +1,29 @@
package elmapi
import (
"testing"
)
func TestGetUser(t *testing.T) {
result, err := elmapi.GetUser()
if err != nil {
t.Fatalf("GetUser failed with error:%v", err)
}
sugarLogger.Debug(result)
}
func TestGetAccAndStores(t *testing.T) {
accs, stores, err := elmapi.GetAccAndStores()
if err != nil || len(stores) == 0 || len(accs) == 0 {
t.Fatalf("GetAccAndStores failed with error:%v", err)
}
sugarLogger.Debug(stores[0])
}
func TestGetShop(t *testing.T) {
result, err := elmapi.GetShop(157451618)
if err != nil {
t.Fatalf("GetShop failed with error:%v", err)
}
sugarLogger.Debug(result)
}