mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 13:17:30 +02:00
parent
d15c2d35ad
commit
cb253af3ba
3 changed files with 37 additions and 1 deletions
22
R/tests/testthat/test-readr.R
Normal file
22
R/tests/testthat/test-readr.R
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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")
|
||||
})
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue