REDCapCAST/R/tests/testthat/test-longitudinal.R
Paul W. Egeler, M.S., GStat d15c2d35ad Increment to v 0.2.0 and closes #10
Form timestamp fields also captured now.
2019-07-15 12:24:30 -04:00

18 lines
535 B
R

context("Longitudinal data")
test_that("CSV export matches reference", {
file_paths <- sapply(
c(
records = "WARRIORtestForSoftwa_DATA_2018-06-21_1431.csv",
metadata = "WARRIORtestForSoftwareUpgrades_DataDictionary_2018-06-21.csv"
), get_data_location
)
redcap <- lapply(file_paths, read.csv, stringsAsFactors = FALSE)
redcap[["metadata"]] <- with(redcap, metadata[metadata[,1] > "",])
redcap_output <- with(redcap, REDCap_split(records, metadata))
expect_known_hash(redcap_output, "0934bcb292")
})