Skip to content

Commit

Permalink
make report test more portable
Browse files Browse the repository at this point in the history
ref #542
  • Loading branch information
wibeasley committed Oct 14, 2024
1 parent 9956da8 commit ae60da8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
13 changes: 1 addition & 12 deletions inst/test-data/specific-redcapr/report/default.R
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
structure(list(record_id = c(1, 2, 3, 4, 5), height = c(7, 6,
180, 165, 193.04), health_complete = c(1, 0, 2, 2, 0), address = c("14 Rose Cottage St. Kenning UK, 323232",
"14 Rose Cottage Blvd. Kenning UK 34243", "243 Hill St. Guthrie OK 73402",
"342 Elm Duncanville TX, 75116", "Hotel Suite New Orleans LA, 70115"
), ethnicity = c(1, 1, 0, 1, 2)), class = "data.frame", row.names = c(NA,
-5L), spec = structure(list(cols = list(record_id = structure(list(), class = c("collector_double",
"collector")), height = structure(list(), class = c("collector_double",
"collector")), health_complete = structure(list(), class = c("collector_double",
"collector")), address = structure(list(), class = c("collector_character",
"collector")), ethnicity = structure(list(), class = c("collector_double",
"collector"))), default = structure(list(), class = c("collector_guess",
"collector")), skip = 1L), class = "col_spec"))
structure(list(), class = c("tbl_df", "tbl", "data.frame"), row.names = integer(0), names = character(0))
6 changes: 5 additions & 1 deletion tests/testthat/test-report.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ library(testthat)

credential <- retrieve_credential_testing()
update_expectation <- FALSE
report_id <- 5980L
report_id <- 12L

if (credential$redcap_uri != "https://redcap-dev-2.ouhsc.edu/redcap/api/") {
testthat::skip("Skip report tests on a new server")
}

test_that("smoke test", {
testthat::skip_on_cran()
Expand Down

0 comments on commit ae60da8

Please sign in to comment.