2018-06-26 05:48:55 +02:00
|
|
|
context("Reading in JSON")
|
|
|
|
|
|
|
|
# Check the RCurl export ---------------------------------------------------
|
|
|
|
test_that("JSON character vector from RCurl matches reference", {
|
|
|
|
|
|
|
|
metadata <- jsonlite::fromJSON(
|
2018-06-28 23:20:14 +02:00
|
|
|
get_data_location(
|
2018-06-26 05:48:55 +02:00
|
|
|
"ExampleProject_metadata.json"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
records <- jsonlite::fromJSON(
|
2018-06-28 23:20:14 +02:00
|
|
|
get_data_location(
|
2018-06-26 05:48:55 +02:00
|
|
|
"ExampleProject_records.json"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
redcap_output_json1 <- REDCap_split(records, metadata)
|
|
|
|
|
|
|
|
expect_known_hash(redcap_output_json1, "2c8b6531597182af1248f92124161e0c")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
# Check the httr export ---------------------------------------------------
|
|
|
|
|
|
|
|
# Something will go here.
|