REDCapCAST/R/tests/testthat/test-readr.R
Paul W. Egeler, MS, GStat cb253af3ba Closing issue #12
test included
2019-07-26 17:26:33 -04:00

23 lines
535 B
R

if (requireNamespace("readr", quietly = TRUE)) {
context("Compatibility with readr")
metadata <- readr::read_csv(
get_data_location(
"ExampleProject_DataDictionary_2018-06-07.csv"
)
)
records <- readr::read_csv(
get_data_location(
"ExampleProject_DATA_2018-06-07_1129.csv"
)
)
test_that("Data read in with `readr` will return correct result", {
redcap_output_readr <- REDCap_split(records, metadata)
expect_known_hash(redcap_output_readr, "bde303d330fba161ca500c10cfabb693")
})
}