Skip tests that require internet if offline

Change-Id: I679362d9d3595c8212c20d2086d92afcbd58d13f
diff --git a/tests/testthat/test-collocations.R b/tests/testthat/test-collocations.R
index e2d1755..7c05658 100644
--- a/tests/testthat/test-collocations.R
+++ b/tests/testthat/test-collocations.R
@@ -1,4 +1,5 @@
 test_that("collocationScoreQuery works", {
+  skip_if_offline()
   kco <- new("KorAPConnection", cache = TRUE, verbose = TRUE)
   df <- collocationScoreQuery(kco, "Ameisenplage", "heimgesucht", leftContextSize=0, rightContextSize=1)
   expect_gt(df$logDice, 1)
@@ -11,7 +12,8 @@
 
 
 test_that("collocationAnalysis works and warns about missing token", {
-    kco <- new("KorAPConnection",
+  skip_if_offline()
+  kco <- new("KorAPConnection",
                accessToken = NULL,
                verbose = TRUE)
     expect_warning(
@@ -34,6 +36,7 @@
 })
 
 test_that("collocationAnalysis on unaccounted strings does not error out", {
+  skip_if_offline()
   kco <- new("KorAPConnection", accessToken = NULL, verbose = TRUE)
   expect_warning(
     df <- collocationAnalysis(kco, "XXXXXXXXAmeisenplage", vc=c("corpusSigle=/WDD17/", "corpusSigle=/WUD17/"), maxRecurse = 2),