2018-06-26 05:48:55 +02:00
|
|
|
|
2023-04-13 10:57:04 +02:00
|
|
|
|
2018-06-26 05:48:55 +02:00
|
|
|
# Check the RCurl export ---------------------------------------------------
|
|
|
|
test_that("JSON character vector from RCurl matches reference", {
|
2023-04-13 10:57:04 +02:00
|
|
|
metadata <-
|
|
|
|
jsonlite::fromJSON(get_data_location("ExampleProject_metadata.json"))
|
2018-06-26 05:48:55 +02:00
|
|
|
|
2023-04-13 10:57:04 +02:00
|
|
|
records <-
|
|
|
|
jsonlite::fromJSON(get_data_location("ExampleProject_records.json"))
|
2018-06-26 05:48:55 +02:00
|
|
|
|
|
|
|
redcap_output_json1 <- REDCap_split(records, metadata)
|
|
|
|
|
|
|
|
expect_known_hash(redcap_output_json1, "2c8b6531597182af1248f92124161e0c")
|
|
|
|
|
|
|
|
})
|