diff --git a/tests/testthat/test-stream.R b/tests/testthat/test-stream.R index beedd22d..c9f268fc 100644 --- a/tests/testthat/test-stream.R +++ b/tests/testthat/test-stream.R @@ -12,7 +12,7 @@ test_that("stream_tweets returns tweets data", { }) -test_that("", { +test_that("Stream for 30 seconds", { skip_if_offline() if (!"RTAA" %in% auth_list()) { skip("Requires different authentication") diff --git a/tests/testthat/test-tweet_threading.R b/tests/testthat/test-tweet_threading.R index ce7578ed..9aea7623 100644 --- a/tests/testthat/test-tweet_threading.R +++ b/tests/testthat/test-tweet_threading.R @@ -35,14 +35,7 @@ test_that("tweet_threading works", { tw <- lookup_tweets(thread[1]) tw_thread <- tweet_threading(tw) expect_s3_class(tw_thread, "data.frame") - delete_thread(thread) -}) - - -test_that("tweet_threading works fast", { - skip_if_offline() - thread <- write_thread() tw <- lookup_tweets(thread) tw_thread1 <- tweet_threading(tw[1, ]) expect_s3_class(tw_thread1, "data.frame") @@ -54,14 +47,7 @@ test_that("tweet_threading works fast", { expect_s3_class(tw_thread4, "data.frame") expect_equal(order(tw_thread1$created_at)[1:4], 1:4) expect_equal(order(tw_thread4$created_at)[1:4], 1:4) - delete_thread(thread) -}) - -test_that("tweet_threading works with id and tweets", { - skip_if_offline() - thread <- write_thread() - tw <- lookup_tweets(thread) tw <- tw[match(thread, tw$id_str), ] th1_id <- tweet_threading(thread[1], traverse = "backwards") @@ -70,14 +56,7 @@ test_that("tweet_threading works with id and tweets", { th10_id <- tweet_threading(thread[10], traverse = "backwards") th10_tw <- tweet_threading(tw[10, ], traverse = "backwards") expect_equal(nrow(th10_id), nrow(th10_tw)) - delete_thread(thread) -}) - -test_that("tweet_threading works forwards", { - skip_if_offline() - thread <- write_thread() - tw <- lookup_tweets(thread) tw <- tw[match(thread, tw$id_str), ] th1_id <- tweet_threading(thread[1], traverse = "forwards") expect_equal(nrow(th1_id), 10) @@ -89,13 +68,6 @@ test_that("tweet_threading works forwards", { th10_tw <- tweet_threading(tw[10, ], traverse = "forwards") expect_equal(nrow(th10_id), nrow(th10_tw)) - delete_thread(thread) -}) - -test_that("tweet_threading works forwards and backwards", { - skip_if_offline() - thread <- write_thread() - t1f <- tweet_threading(thread[1], traverse = "forwards") expect_equal(nrow(t1f), 10) t1b <- tweet_threading(thread[1], traverse = "backwards")