1 Star 0 Fork 0

taadis / aikucun-sdk-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
activity_list_test.go 718 Bytes
一键复制 编辑 原始数据 按行查看 历史
taadis 提交于 2020-09-12 16:30 . update activity list
package aikucun
import (
"testing"
)
func TestActivityListResponseString(t *testing.T) {
resp := &ActivityListResponse{}
s := resp.String()
t.Log(s)
if s == "" {
t.Fatal(s)
}
}
func TestActivityList(t *testing.T) {
parseArgs(t)
url := ""
if *isPro {
url = UrlPro
} else {
url = UrlTest
}
client := NewClient(
WithUrl(url),
WithAppId(*appId),
WithAppSecret(*appSecret),
WithErp(*erp),
WithErpVersion(*erpVersion),
)
req := NewActivityListRequest()
req.Status = 1
t.Log("req:", req)
resp, err := client.ActivityList(req)
if err != nil {
t.Fatal(err.Error())
}
// body: {"code":10003,"data":{},"message":"参数错误","status":"error"}
if resp.Code != 0 {
t.Fatal(resp)
}
}
Go
1
https://gitee.com/taadis/aikucun-sdk-go.git
git@gitee.com:taadis/aikucun-sdk-go.git
taadis
aikucun-sdk-go
aikucun-sdk-go
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891