tests/testthat/test-350-exportNextRecordName-Functionality.R

context("Export Next Record Name Functionality")

test_that(
  "Return the next record name", 
  {
    Records <- exportRecords(rcon, 
                             fields = "record_id")
    next_id <- max(as.numeric(Records$record_id)) + 1
    # Since the test data base can be expected to 
    expect_equal(exportNextRecordName(rcon), 
                 next_id)
  }
)

Try the redcapAPI package in your browser

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

redcapAPI documentation built on Sept. 13, 2023, 1:07 a.m.