Fix cursor test
This commit is contained in:
parent
7d5b51da84
commit
78bf7d6365
1 changed files with 4 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ package twitterscraper_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
twitterscraper "github.com/n0madic/twitter-scraper"
|
twitterscraper "github.com/n0madic/twitter-scraper"
|
||||||
|
|
@ -17,6 +18,9 @@ func TestFetchSearchCursor(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
if strings.HasPrefix(cursor, "scroll:") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if cursor == "" {
|
if cursor == "" {
|
||||||
t.Fatal("Expected search cursor is empty")
|
t.Fatal("Expected search cursor is empty")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue