tests/testthat/test-clinicaltrials_gov_version_startdate_precision.R

test_that("ClinicalTrials.gov start date precision downloads correctly", {
    version <- clinicaltrials_gov_version("NCT02110043", 1)
    if (version[1] == "Error") {
        expect_equal(
            version[1],
            "Error"
        ) 
    } else {
        expect_equal(
            version$startdate_precision,
            "month"
        )
    }
})

Try the cthist package in your browser

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

cthist documentation built on Sept. 11, 2024, 5:31 p.m.