2024-02-23 10:34:33 +03:00
|
|
|
package twitterscraper_test
|
|
|
|
|
|
|
|
|
|
import (
|
2024-02-23 10:58:24 +03:00
|
|
|
"encoding/json"
|
|
|
|
|
"fmt"
|
2024-02-23 10:34:33 +03:00
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestFetchScheduledTweets(t *testing.T) {
|
2024-02-23 10:58:24 +03:00
|
|
|
scheduled, err := testScraper.FetchScheduledTweets()
|
2024-02-23 10:34:33 +03:00
|
|
|
if err != nil {
|
|
|
|
|
t.Error(err)
|
|
|
|
|
}
|
2024-02-23 10:58:24 +03:00
|
|
|
|
|
|
|
|
b, _ := json.Marshal(scheduled)
|
|
|
|
|
fmt.Println(string(b))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestDeleteScheduledTweets(t *testing.T) {
|
|
|
|
|
if err := testScraper.DeleteScheduledTweet("1760827700724355072"); err != nil {
|
|
|
|
|
t.Error(err)
|
|
|
|
|
}
|
2024-02-23 10:34:33 +03:00
|
|
|
}
|