skip tests that requires auth

This commit is contained in:
Valentine 2024-03-08 19:23:39 +03:00
parent 02625a94bd
commit b29bf22ac1
6 changed files with 21 additions and 9 deletions

View file

@ -8,6 +8,9 @@ import (
)
func TestFetchScheduledTweets(t *testing.T) {
if skipAuthTest {
t.Skip("Skipping test due to environment variable")
}
scheduled, err := testScraper.FetchScheduledTweets()
if err != nil {
t.Error(err)
@ -20,6 +23,9 @@ func TestFetchScheduledTweets(t *testing.T) {
var id string
func TestCreateScheduledTweets(t *testing.T) {
if skipAuthTest {
t.Skip("Skipping test due to environment variable")
}
var err error
id, err = testScraper.CreateScheduledTweet("new tweet", time.Now().Add(time.Hour*24*31))
if err != nil {