tests/testthat/test-api.R

context("API wrapping")

with_mock_api({
    test_that("Handling when pivotal.project is not set", {
        old <- options(pivotal.project=NULL)
        on.exit(do.call(options, old))
        expect_error(ptGET(pivotalURL("test")),
            "No PivotalTracker project ID set. Provide it with 'options(pivotal.project=YOURID)'",
            fixed=TRUE)
    })
})

Try the pivotaltrackR package in your browser

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

pivotaltrackR documentation built on Jan. 13, 2021, 5:43 a.m.