Code optimization
This commit is contained in:
parent
a4375c3b2d
commit
6c4a1cc054
4 changed files with 28 additions and 42 deletions
|
|
@ -129,3 +129,14 @@ func TestGetProfileErrorNotFound(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetUserIDByScreenName(t *testing.T) {
|
||||
scraper := New()
|
||||
userID, err := scraper.GetUserIDByScreenName("Twitter")
|
||||
if err != nil {
|
||||
t.Errorf("getUserByScreenName() error = %v", err)
|
||||
}
|
||||
if userID == "" {
|
||||
t.Error("Expected non-empty user ID")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue