Fix error msg
This commit is contained in:
parent
7b1e9d2f07
commit
f3597d0db6
2 changed files with 10 additions and 10 deletions
|
|
@ -19,7 +19,7 @@ func TestGetTweets(t *testing.T) {
|
|||
} else {
|
||||
count++
|
||||
if tweet.ID == "" {
|
||||
t.Error("Expected tweet ID is not empty")
|
||||
t.Error("Expected tweet ID is empty")
|
||||
} else {
|
||||
if dupcheck[tweet.ID] {
|
||||
t.Errorf("Detect duplicated tweet ID: %s", tweet.ID)
|
||||
|
|
@ -28,32 +28,32 @@ func TestGetTweets(t *testing.T) {
|
|||
}
|
||||
}
|
||||
if tweet.UserID == "" {
|
||||
t.Error("Expected tweet UserID is not empty")
|
||||
t.Error("Expected tweet UserID is empty")
|
||||
}
|
||||
if tweet.Username == "" {
|
||||
t.Error("Expected tweet Username is not empty")
|
||||
t.Error("Expected tweet Username is empty")
|
||||
}
|
||||
if tweet.PermanentURL == "" {
|
||||
t.Error("Expected tweet PermanentURL is not empty")
|
||||
t.Error("Expected tweet PermanentURL is empty")
|
||||
}
|
||||
if tweet.Text == "" {
|
||||
t.Error("Expected tweet Text is not empty")
|
||||
t.Error("Expected tweet Text is empty")
|
||||
}
|
||||
if tweet.TimeParsed.IsZero() {
|
||||
t.Error("Expected tweet TimeParsed is not zero")
|
||||
t.Error("Expected tweet TimeParsed is zero")
|
||||
}
|
||||
if tweet.Timestamp == 0 {
|
||||
t.Error("Expected tweet Timestamp is greater than zero")
|
||||
}
|
||||
for _, video := range tweet.Videos {
|
||||
if video.ID == "" {
|
||||
t.Error("Expected tweet video ID is not empty")
|
||||
t.Error("Expected tweet video ID is empty")
|
||||
}
|
||||
if video.Preview == "" {
|
||||
t.Error("Expected tweet video Preview is not empty")
|
||||
t.Error("Expected tweet video Preview is empty")
|
||||
}
|
||||
if video.URL == "" {
|
||||
t.Error("Expected tweet video URL is not empty")
|
||||
t.Error("Expected tweet video URL is empty")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue