tests/testthat/test-itis_ping.R

context("itis_ping")

test_that("itis_ping returns the correct class", {
  skip_on_cran()
  vcr::use_cassette("itis_ping", {
    one <- itis_ping()
  })

  expect_is(one, "logical")
})

test_that("itis_ping returns correct things", {
  skip_on_cran()
  vcr::use_cassette("itis_ping_http_code_503", {
    expect_false(itis_ping(503))
  })

  vcr::use_cassette("itis_ping_http_code_200", {
    expect_true(itis_ping(200))
  })
})

Try the taxize package in your browser

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

taxize documentation built on Sept. 11, 2024, 6:13 p.m.