2020-02-12 10:45:19 +02:00
|
|
|
package twitterscraper
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestGetTrends(t *testing.T) {
|
|
|
|
|
trends, err := GetTrends()
|
|
|
|
|
if err != nil {
|
|
|
|
|
t.Error(err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if len(trends) != 10 {
|
2020-02-14 16:10:29 +02:00
|
|
|
t.Errorf("Expected 10 trends, got %d: %#v", len(trends), trends)
|
2020-02-12 10:45:19 +02:00
|
|
|
}
|
|
|
|
|
}
|