mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-21 14:09:08 +02:00
Completed working test suite and added CI
This commit is contained in:
parent
0aed5bb118
commit
a0a482abef
10 changed files with 153 additions and 55 deletions
|
|
@ -1,22 +1,16 @@
|
|||
context("Reading in JSON")
|
||||
|
||||
# Set up the path ----------------------------------------------------------
|
||||
|
||||
data_dir <- system.file("tests", "testthat", "data", package = "REDCapRITS")
|
||||
|
||||
# Check the RCurl export ---------------------------------------------------
|
||||
test_that("JSON character vector from RCurl matches reference", {
|
||||
|
||||
metadata <- jsonlite::fromJSON(
|
||||
file.path(
|
||||
data_dir,
|
||||
get_data_location(
|
||||
"ExampleProject_metadata.json"
|
||||
)
|
||||
)
|
||||
|
||||
records <- jsonlite::fromJSON(
|
||||
file.path(
|
||||
data_dir,
|
||||
get_data_location(
|
||||
"ExampleProject_records.json"
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue