aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-11-19 16:03:38 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-11-19 16:03:38 +0100
commit300c0fccf327b9959db39c256bae0974908e59b2 (patch)
treea1b461ad04e63aa8d0463f2b468ee873ddb1b383 /tests/testthat
parentdb9ae6a0c9cecb92048fde6f06af1da183c09b5f (diff)
Update tests, improve CAKE_export test
Diffstat (limited to 'tests/testthat')
-rw-r--r--tests/testthat/FOCUS_2006_D.csf2
-rw-r--r--tests/testthat/test_CAKE_export.R5
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/testthat/FOCUS_2006_D.csf b/tests/testthat/FOCUS_2006_D.csf
index 7d562426..5969712b 100644
--- a/tests/testthat/FOCUS_2006_D.csf
+++ b/tests/testthat/FOCUS_2006_D.csf
@@ -5,7 +5,7 @@ Description:
MeasurementUnits: % AR
TimeUnits: days
Comments: Created using mkin::CAKE_export
-Date: 2020-11-11
+Date: Dummy date 0000-00-00
Optimiser: IRLS
[Data]
diff --git a/tests/testthat/test_CAKE_export.R b/tests/testthat/test_CAKE_export.R
index 8445b69a..b3941f1b 100644
--- a/tests/testthat/test_CAKE_export.R
+++ b/tests/testthat/test_CAKE_export.R
@@ -6,10 +6,9 @@ test_that("Exporting is reproducible", {
"FOCUS D" = FOCUS_2006_D),
map = c(parent = "Parent", m1 = "M1"),
links = c(parent = "m1"),
- filename = "FOCUS_2006_D.csf", overwrite = TRUE,
- study = "FOCUS 2006 D")
+ filename = "FOCUS_2006_D.csf", overwrite = TRUE,
+ study = "FOCUS 2006 D", date = "Dummy date 0000-00-00")
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),

Contact - Imprint