working to submit to cran

This commit is contained in:
AG Damsbo 2023-01-16 09:49:17 +01:00
commit be3969d007
11 changed files with 200 additions and 265 deletions

View file

@ -1,28 +1,17 @@
context("Primary table name processing")
## "Primary table name processing"
# Global variables -------------------------------------------------------
metadata <- jsonlite::fromJSON(
get_data_location(
"ExampleProject_metadata.json"
)
)
metadata <- jsonlite::fromJSON(get_data_location("ExampleProject_metadata.json"))
records <- jsonlite::fromJSON(
get_data_location(
"ExampleProject_records.json"
)
)
records <- jsonlite::fromJSON(get_data_location("ExampleProject_records.json"))
ref_hash <- "2c8b6531597182af1248f92124161e0c"
# Tests -------------------------------------------------------------------
test_that("Will not use a repeating instrument name for primary table", {
redcap_output_json1 <- expect_warning(
REDCap_split(records, metadata, "sale"),
"primary table"
)
redcap_output_json1 <- expect_warning(REDCap_split(records, metadata, "sale"),
"primary table")
expect_known_hash(redcap_output_json1, ref_hash)