diff --git a/tests/testthat/test-raw-data.R b/tests/testthat/test-raw-data.R index 0d4da09..4dc3adc 100644 --- a/tests/testthat/test-raw-data.R +++ b/tests/testthat/test-raw-data.R @@ -9,7 +9,7 @@ extract_bundle_details <- function(path) { } assert_bundle_has_name <- function(bundle) { - bundle_name_file <- omopbundles:::get_raw_dir(bundle$domain, "bundle_names.csv") + bundle_name_file <- get_raw_dir(bundle$domain, "bundle_names.csv") bundle_names <- read_csv(bundle_name_file, show_col_types = FALSE) expect_true(bundle$id %in% bundle_names$id, @@ -17,7 +17,7 @@ assert_bundle_has_name <- function(bundle) { } test_that("All raw bundles have at least one name", { - raw_dir <- omopbundles:::get_raw_dir() + raw_dir <-get_raw_dir() concept_files <- Sys.glob(file.path(raw_dir, "*", "bundles", "*.csv")) bundle_ids <- purrr::map(concept_files, extract_bundle_details) @@ -27,13 +27,13 @@ test_that("All raw bundles have at least one name", { test_that("All raw bundle names map to a bundle file that has at least one concept", { - bundles <- omopbundles:::raw_bundles() + bundles <- raw_bundles() # Ensure bundles dataframe is not empty expect_true(nrow(bundles) > 0) apply(bundles, 1, function(bundle) { - concepts <- omopbundles:::raw_concept_by_bundle(bundle["domain"], bundle["id"]) + concepts <- raw_concept_by_bundle(bundle["domain"], bundle["id"]) # Check that at least one concept expect_true(nrow(concepts) > 0)