aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/test_CAKE_export.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2019-10-21 15:31:59 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2019-10-21 15:31:59 +0200
commit41a2a356bd9b61c90c04b47aee147bf837223028 (patch)
tree8bc2649d36faefede800e058a86bd0c322625fbd /tests/testthat/test_CAKE_export.R
parent7624a2b8398b4ad665a3b0b622488e1893a5ee7c (diff)
Improve tests, remove geometric_mean
Diffstat (limited to 'tests/testthat/test_CAKE_export.R')
-rw-r--r--tests/testthat/test_CAKE_export.R8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/testthat/test_CAKE_export.R b/tests/testthat/test_CAKE_export.R
index 23b424fc..a95a27ee 100644
--- a/tests/testthat/test_CAKE_export.R
+++ b/tests/testthat/test_CAKE_export.R
@@ -19,8 +19,9 @@
context("Export dataset for reading into CAKE")
test_that("Exporting is reproducible", {
- CAKE_export(list("FOCUS C" = FOCUS_2006_C,
- "FOCUS D" = FOCUS_2006_D),
+ CAKE_export(
+ ds = list("FOCUS C" = FOCUS_2006_C,
+ "FOCUS D" = FOCUS_2006_D),
map = c(parent = "Parent", m1 = "M1"),
links = c(parent = "m1"),
filename = "FOCUS_2006_D.csf", overwrite = TRUE,
@@ -28,4 +29,7 @@ test_that("Exporting is reproducible", {
csf <- readLines(con = "FOCUS_2006_D.csf")
csf[8] <- "Date: Dummy date 0000-00-00"
expect_known_value(csf, file = "FOCUS_2006_D.rds")
+ expect_error(CAKE_export(ds = list("FOCUS C" = FOCUS_2006_C),
+ filename = "FOCUS_2006_D.csf", overwrite = FALSE),
+ "already exists")
})

Contact - Imprint