Add more tests for misc functions
Change-Id: I39210ef2d968eb5d5a671e24cbf3f1e4b9293d50
diff --git a/tests/testthat/test-demos.R b/tests/testthat/test-demos.R
index 8f99284..c0412ba 100644
--- a/tests/testthat/test-demos.R
+++ b/tests/testthat/test-demos.R
@@ -116,3 +116,11 @@
hc_freq_by_year_ci()
expect_true(all(class(hc) %in% c("highchart", "htmlwidget")))
})
+
+test_that("collocationScoreQuery works iwth hchart and hc_add_onclick_korap_search", {
+ kco <- new("KorAPConnection", cache = TRUE, verbose = TRUE)
+ df <- collocationScoreQuery(kco,"Ameisenplage", "heimgesucht", leftContextSize=0, rightContextSize=1)
+ hc <- hchart(df, type="spline", hcaes(label, logDice))
+ hc <- hc_add_onclick_korap_search(hc)
+ expect_true(all(class(hc) %in% c("highchart", "htmlwidget")))
+})