tests/testthat/clinicaltrials_gov_download_latest.R

test_that("ClinicalTrials.gov history entries mass-download correctly", {
    filename <- tempfile()
    if (file.exists(filename)) {
        file.remove(filename)
    }
    result <- clinicaltrials_gov_download(
        c("NCT02329873"), filename, TRUE, TRUE
    )
    expect_equal(
        result == TRUE || result == FALSE,
        TRUE
    )
})

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.