add GetSpace method
This commit is contained in:
parent
571a63bb50
commit
f8c200b312
4 changed files with 340 additions and 6 deletions
23
spaces_test.go
Normal file
23
spaces_test.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package twitterscraper_test
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetSpace(t *testing.T) {
|
||||
if skipAuthTest {
|
||||
t.Skip("Skipping test due to environment variable")
|
||||
}
|
||||
|
||||
spaceId := "1OdJrXPVLEnKX"
|
||||
|
||||
space, err := testScraper.GetSpace(spaceId)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if space.ID != spaceId {
|
||||
t.Fatal(errors.New("returned space id is not requested"))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue