Skip to content

Commit

Permalink
starting two expected datasets for DAGs
Browse files Browse the repository at this point in the history
ref #353
  • Loading branch information
wibeasley committed Sep 24, 2021
1 parent 34f2617 commit b39e80c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ cURL
codebook
codecov
cran
cran's
csv
datetime
dropdown
Expand Down
11 changes: 11 additions & 0 deletions inst/test-data/specific-redcapr/read-dag/assigned-to-dag-a.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
structure(list(record_id = c("331-1", "331-2"), first_name = c("aa",
"bb"), last_name = c("AA", "BB"), address = c(NA_character_,
NA_character_), telephone = c(NA_character_, NA_character_),
email = c(NA_character_, NA_character_), dob = c(NA_character_,
NA_character_), age = c(NA_character_, NA_character_), ethnicity = c(NA_character_,
NA_character_), race = c(NA_character_, NA_character_), sex = c(NA_character_,
NA_character_), height = c(NA_character_, NA_character_),
weight = c(NA_character_, NA_character_), bmi = c(NA_character_,
NA_character_), comments = c(NA_character_, NA_character_
), demographics_complete = c("0", "0")), row.names = c(NA,
-2L), class = "data.frame")
11 changes: 11 additions & 0 deletions inst/test-data/specific-redcapr/read-dag/no-assignment.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
structure(list(record_id = c("331-1", "331-2"), first_name = c("aa",
"bb"), last_name = c("AA", "BB"), address = c(NA_character_,
NA_character_), telephone = c(NA_character_, NA_character_),
email = c(NA_character_, NA_character_), dob = c(NA_character_,
NA_character_), age = c(NA_character_, NA_character_), ethnicity = c(NA_character_,
NA_character_), race = c(NA_character_, NA_character_), sex = c(NA_character_,
NA_character_), height = c(NA_character_, NA_character_),
weight = c(NA_character_, NA_character_), bmi = c(NA_character_,
NA_character_), comments = c(NA_character_, NA_character_
), demographics_complete = c("0", "0")), row.names = c(NA,
-2L), class = "data.frame")
4 changes: 2 additions & 2 deletions tests/testthat/test-read-dag.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ test_that("smoke test", {
})
test_that("default", {
testthat::skip_on_cran()
path_expected <- "test-data/specific-redcapr/read-clinical-trial/default.R"
expected_outcome_message <- "500 records and 13 columns were read from REDCap in \\d+(\\.\\d+\\W|\\W)seconds\\."
path_expected <- "test-data/specific-redcapr/read-dag/assigned-to-dag-a.R"
expected_outcome_message <- "2 records and 16 columns were read from REDCap in \\d+(\\.\\d+\\W|\\W)seconds\\."

expect_message(
regexp = expected_outcome_message,
Expand Down

0 comments on commit b39e80c

Please sign in to comment.