summaryrefslogtreecommitdiff
path: root/tests/testthat
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testthat')
-rw-r--r--tests/testthat/test-corplot.R5
-rw-r--r--tests/testthat/test-gg_csobczak.R7
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/testthat/test-corplot.R b/tests/testthat/test-corplot.R
new file mode 100644
index 0000000..2aecdc1
--- /dev/null
+++ b/tests/testthat/test-corplot.R
@@ -0,0 +1,5 @@
+test_that("returns a ggplot object", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- corplot(x)
+ inherits(p, 'ggplot')
+})
diff --git a/tests/testthat/test-gg_csobczak.R b/tests/testthat/test-gg_csobczak.R
new file mode 100644
index 0000000..ca99bef
--- /dev/null
+++ b/tests/testthat/test-gg_csobczak.R
@@ -0,0 +1,7 @@
+test_that("returns a ggplot object", {
+ df <- data.frame(x = rnorm(10), y = rnorm(10))
+ p <- ggplot2::ggplot(data = df, ggplot2::aes(x = x, y = y)) +
+ ggplot2::geom_point()
+ p <- gg_csobczak(p)
+ inherits(p, 'ggplot')
+})