2018-06-25 06:39:56 +02:00
|
|
|
context("Longitudinal data")
|
|
|
|
|
|
|
|
test_that("CSV export matches reference", {
|
2018-06-28 23:20:14 +02:00
|
|
|
file_paths <- sapply(
|
2018-06-25 06:39:56 +02:00
|
|
|
c(
|
|
|
|
records = "WARRIORtestForSoftwa_DATA_2018-06-21_1431.csv",
|
|
|
|
metadata = "WARRIORtestForSoftwareUpgrades_DataDictionary_2018-06-21.csv"
|
2018-06-28 23:20:14 +02:00
|
|
|
), get_data_location
|
2018-06-25 06:39:56 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
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, "dff3a52955")
|
|
|
|
})
|