This commit is contained in:
suyl
2021-05-25 15:48:43 +08:00
parent 3c3931e811
commit f38cda025d
4 changed files with 109 additions and 3 deletions

View File

@@ -1,6 +1,9 @@
package qywxapi
import "testing"
import (
"git.rosy.net.cn/baseapi/utils"
"testing"
)
func TestGetProviderToken(t *testing.T) {
result, err := api.GetProviderToken()
@@ -9,3 +12,30 @@ func TestGetProviderToken(t *testing.T) {
}
sugarLogger.Debug(result)
}
func TestToken(t *testing.T) {
result, err := api.GetToken()
if err != nil {
t.Fatal(err.Error())
}
sugarLogger.Debug(result)
}
func TestGroupchatList(t *testing.T) {
result, err := api.GroupchatList("", 20)
if err != nil {
t.Fatal(err.Error())
}
t.Log(utils.Format4Output(result, false))
}
func TestGroupchat(t *testing.T) {
//wr0oKiEAAAw0osTU89uH7mtEg6YqzQ3A
//wr0oKiEAAAmSw5HwLHZQIb29yR6We_lg
//wr0oKiEAAAAi7dreYASbygbXrWtNxbNg
result, err := api.Groupchat("wr0oKiEAAAAi7dreYASbygbXrWtNxbNg")
if err != nil {
t.Fatal(err.Error())
}
t.Log(utils.Format4Output(result, false))
}