This commit is contained in:
苏尹岚
2021-04-20 14:44:27 +08:00
parent a2b440172e
commit 7ab406d18f
2 changed files with 16 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package mtunionapi
import (
"fmt"
"strings"
"testing"
@@ -27,11 +28,11 @@ func init() {
}
func TestGenerateLink(t *testing.T) {
_, err := api.GenerateLink(2, strings.ToLower("EFA9876238FC11EB9101525400C36BDA"))
result, err := api.GenerateLink(2, strings.ToLower("EFA9876238FC11EB9101525400C36BDA"))
if err != nil {
t.Fatal(err)
}
// t.Log(utils.Format4Output(result, false))
t.Log(utils.Format4Output(result, false))
}
func TestActivityList(t *testing.T) {
@@ -39,5 +40,9 @@ func TestActivityList(t *testing.T) {
if err != nil {
t.Fatal(err)
}
for _ , v := range result {
fmt.Println(utils.Str2Time(v.DateBound[:strings.LastIndex(v.DateBound, "至")-1]))
fmt.Println(utils.Str2Time(v.DateBound[strings.LastIndex(v.DateBound, "至")+4:]))
}
t.Log(utils.Format4Output(result, false))
}