tests/testthat/test-exportCohortDefinitionSet.R

with_mock_dir("mocks/exportCohortDefinitionSet", {
  
  test_that("exportCohortDefinitionSet works", {
    cohortDefinitionSet <- ROhdsiWebApi::exportCohortDefinitionSet(baseUrl = baseUrl,
                                                                   cohortIds = c(2,4,6),
                                                                   generateStats = TRUE)
    expect_s3_class(cohortDefinitionSet, "data.frame")
    expect_equal(nrow(cohortDefinitionSet), 3)
  })
})
OHDSI/ROhdsiWebApi documentation built on March 15, 2023, 1:23 p.m.