tests/testthat/test_cohort.R

# capture_requests({
#   my_cohort <- cb_load_cohort(cohort_id = "61f18422acdea8299c3f56b5", cb_version = "v1")
#   expect_s4_class(my_cohort, "cohort")
# })

with_mock_api({
  test_that("Get a cohort class method", {
    my_cohort <- cb_load_cohort(cohort_id = "61f18422acdea8299c3f56b5", cb_version = "v1")
    expect_s4_class(my_cohort, "cohort")
  })
})

Try the cloudos package in your browser

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

cloudos documentation built on March 31, 2023, 9:52 p.m.