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. 20, 2018, 9:23 a.m.