Skip to content

Commit

Permalink
Merge pull request nationalparkservice#148 from RobLBaker/main
Browse files Browse the repository at this point in the history
Fix test_license so that it works properly with restricted references
  • Loading branch information
RobLBaker authored Sep 26, 2024
2 parents a31ac96 + 3f1175c commit 8a23fda
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/required_eml_elements.R
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ test_cui_dissemination <- function(metadata = load_metadata(directory)) {
#' }
test_license <- function(metadata = load_metadata(directory)) {
is_eml(metadata)
license_list <- c("Public Domain", "CC0 1.0 Universal", "No License/Controlled Unclassified Information")
license_list <- c("Public Domain", "CC0 1.0 Universal", "Unlicensed (not for public dissemination)")

license <- metadata$dataset$licensed$licenseName
if(is.null(license)){
Expand Down
17 changes: 17 additions & 0 deletions tests/testthat/test-optional_data_checks.R
Original file line number Diff line number Diff line change
@@ -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)
}
)

# ----

0 comments on commit 8a23fda

Please sign in to comment.