forked from n0madic/twitter-scraper
-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathfollows_test.go
More file actions
31 lines (28 loc) · 713 Bytes
/
Copy pathfollows_test.go
File metadata and controls
31 lines (28 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package twitterscraper_test
import (
"testing"
)
func TestFetchFollowing(t *testing.T) {
if skipAuthTest {
t.Skip("Skipping test due to environment variable")
}
users, _, err := testScraper.FetchFollowing("Support", 20, "")
if err != nil {
t.Error(err)
}
if len(users) < 1 || users[len(users)-1].Username == "" {
t.Error("error FetchFollowing() No users found")
}
}
func TestFetchFollowers(t *testing.T) {
if skipAuthTest {
t.Skip("Skipping test due to environment variable")
}
users, _, err := testScraper.FetchFollowers("Support", 20, "")
if err != nil {
t.Error(err)
}
if len(users) < 1 || users[len(users)-1].Username == "" {
t.Error("error FetchFollowing() No users found")
}
}