tests/testthat/test-schema.R

test_that("schema works", {
  expect_equal(ctgov_schema(), "")

  ctgov_schema("test")
  expect_equal(ctgov_schema(), "test")

  expect_error(ctgov_set_schema(c("a", "b")))
  expect_error(ctgov_set_schema(3))

  ctgov_schema("")
  expect_equal(format_schema(), "")

  ctgov_schema("test")
  expect_equal(format_schema(), "test.")
})

Try the ctrialsgov package in your browser

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

ctrialsgov documentation built on Aug. 8, 2025, 7:39 p.m.