tests/testthat/test-fieldguide.R

context("Test fieldguide generator")

thischeck <- function() {
    test_that("fieldguide works as expected", {
        skip_on_cran()
        tmp <- fieldguide(guids = c("http://id.biodiversity.org.au/node/apni/
                                   2890970"))
        expect_is(tmp, "character")
        expect_equal(length(tmp), 1)
        expect_true(file.exists(tmp))
    })
}
check_caching(thischeck)

thischeck <- function() {
    test_that("fieldguide degenerate calls work", {
        expect_error(fieldguide()) ## no guids
        expect_error(fieldguide(guids = NULL)) ## NULL guids
    })
}
check_caching(thischeck)

Try the ALA4R package in your browser

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

ALA4R documentation built on July 12, 2021, 9:07 a.m.