tests/testthat/test-exportArms.R

context("exportArms.R")

if (file.exists("local-token.Rdata")){
  load("local-token.Rdata")
} else {
  url <- "https://redcap.notaplace.net/redcap/api/"
  token_case_01 <- "NOTaREALtoken1234567890123456789"
}

rcon <- redcapConnection(url = url,
                         token = token_case_01)

test_that(
  "Return NULL for simple project",
  {
    expect_null(
      exportArms(rcon)
    )
  }
)

Try the redcapAPI package in your browser

Any scripts or data that you put into this service are public.

redcapAPI documentation built on Feb. 18, 2020, 1:09 a.m.