From a71ba5d22a166746cd49431731b216ecb369d766 Mon Sep 17 00:00:00 2001 From: "BOITARD Nicolas (Externe)" <123453373+boitardn@users.noreply.github.com> Date: Mon, 22 Jan 2024 09:37:44 +0100 Subject: [PATCH] Complete unit tests of updateGeneralSettings() --- tests/testthat/test-updateGeneralSettings.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-updateGeneralSettings.R b/tests/testthat/test-updateGeneralSettings.R index 10032948..f103ad6d 100644 --- a/tests/testthat/test-updateGeneralSettings.R +++ b/tests/testthat/test-updateGeneralSettings.R @@ -12,10 +12,15 @@ sapply(studies, function(study) { test_that("Update a general parameter", { + # year-by-year + expect_true(getOption("antares")$parameters$general$`year-by-year`) updateGeneralSettings(year.by.year = FALSE) - expect_false(getOption("antares")$parameters$general$`year-by-year`) + # geographic-trimming + expect_true(getOption("antares")$parameters$general$`geographic-trimming`) + updateGeneralSettings(geographic.trimming = FALSE) + expect_false(getOption("antares")$parameters$general$`geographic-trimming`) }) # remove temporary study