Completed working test suite and added CI

This commit is contained in:
pegeler 2018-06-28 17:20:14 -04:00
commit a0a482abef
10 changed files with 153 additions and 55 deletions

View file

@ -1,17 +1,14 @@
context("Longitudinal data")
test_that("CSV export matches reference", {
# Reading in the files
file_paths <- file.path(
system.file("tests", "testthat", "data", package = "REDCapRITS"),
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)
names(redcap) <- c("records", "metadata")
redcap[["metadata"]] <- with(redcap, metadata[metadata[,1] > "",])
redcap_output <- with(redcap, REDCap_split(records, metadata))