diff --git a/test/a_main_test.go b/test/a_main_test.go index 1fee155..124f52e 100644 --- a/test/a_main_test.go +++ b/test/a_main_test.go @@ -27,6 +27,20 @@ func TestNewTikTok(t *testing.T) { log.Println(c.IsDebug()) } +func TestAuthCodeUrl(t *testing.T){ + c, err := GetTikTok() + if err != nil { + t.Fatalf(err.Error()) + } + resp, err := c.CodeAuthUrl() + if err != nil { + t.Fatalf(err.Error()) + } + log.Println("resp ", resp) +} + + + func GetTikTok() (tiktok.ITiktok, error) { clientKey := os.Getenv("CLIENT_KEY") clientSecret := os.Getenv("CLIENT_SECRET") @@ -37,3 +51,4 @@ func GetTikTok() (tiktok.ITiktok, error) { } return c, nil } + diff --git a/test/api_content_test.go b/test/api_content_test.go index c74b112..8ec5821 100644 --- a/test/api_content_test.go +++ b/test/api_content_test.go @@ -25,9 +25,9 @@ func TestGetVideoList( t *testing.T){ t.Fatalf(err.Error()) } c.IsDebug() - resp, err := c.GetVideoList(int64(20)) + /*resp, err := c.GetVideoList(int64(20)) if err != nil { t.Fatalf(err.Error()) } - log.Println("resp ", resp) + log.Println("resp ", resp)*/ } \ No newline at end of file