GetTrends required login
This commit is contained in:
parent
41b7e80ee8
commit
53d4add980
2 changed files with 5 additions and 5 deletions
2
.github/workflows/go.yml
vendored
2
.github/workflows/go.yml
vendored
|
|
@ -22,4 +22,4 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test -v -run '^(TestGetGuestToken|TestLoginOpenAccount|TestGetProfile|TestGetProfilePrivate|TestGetProfileErrorSuspended|TestGetProfileErrorNotFound|TestGetUserIDByScreenName|TestGetTweets|TestGetTrends)$'
|
run: go test -v -run '^(TestGetGuestToken|TestLoginOpenAccount|TestGetProfile|TestGetProfilePrivate|TestGetProfileErrorSuspended|TestGetProfileErrorNotFound|TestGetUserIDByScreenName|TestGetTweets)$'
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@ package twitterscraper_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
twitterscraper "github.com/n0madic/twitter-scraper"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetTrends(t *testing.T) {
|
func TestGetTrends(t *testing.T) {
|
||||||
scraper := twitterscraper.New()
|
if skipAuthTest {
|
||||||
trends, err := scraper.GetTrends()
|
t.Skip("Skipping test due to environment variable")
|
||||||
|
}
|
||||||
|
trends, err := testScraper.GetTrends()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue