tests/testthat/test-clinicaltrials_gov_version_om_data.R

test_that("ClinicalTrials.gov outcome measures downloads correctly", {
    version <- clinicaltrials_gov_version("NCT02110043", 1)
    if (version[1] == "Error") {
        expect_equal(
            version[1],
            "Error"
        ) 
    } else {
        expect_equal(
            jsonlite::fromJSON(version$outcomes)$measure[1],
            "Performance in LOCATO task (Visual-spatial learning and memory) after a combination of intensive visual-spatial training and tDCS"
        )
    }
})

Try the cthist package in your browser

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

cthist documentation built on Nov. 5, 2023, 1:09 a.m.