From bf26ef8ffa371cdef176d4510e176048a7ced3ee Mon Sep 17 00:00:00 2001 From: Rob Baker Date: Thu, 19 Sep 2024 16:14:25 -0600 Subject: [PATCH] add unit tests for optional data tests. --- tests/testthat/test-optional_data_checks.R | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/testthat/test-optional_data_checks.R diff --git a/tests/testthat/test-optional_data_checks.R b/tests/testthat/test-optional_data_checks.R new file mode 100644 index 0000000..1a91f56 --- /dev/null +++ b/tests/testthat/test-optional_data_checks.R @@ -0,0 +1,17 @@ +good_dir <- test_path("good") +bad_dir <- test_path("bad") +bicy_meta <- load_metadata(test_path("good", "BICY_good")) +buis_meta <- load_metadata(test_path("good", "BUIS_good")) + +# ---- test_pii_meta_emails + +test_that("test_pii_data_emails finds true negatives", + { + msg <- "Data files do not appear to contain any personal emails." + expect_message(test_pii_data_emails(here::here(good_dir, + "BICY_good")), + msg) + } +) + +# ----