tests/testthat/test-image.R

# tests for image
context("image")

test_that("fails well with no input", {
  expect_error(image(), "argument \"id\" is missing")
})

test_that("fails well with non-existent droplet", {
	skip_on_cran()

  expect_error(image("bearbearbear"), "The resource you were accessing could not be found")
})

test_that("httr curl options work", {
	skip_on_cran()

  library("httr")
  expect_error(image("asdfadf", config = timeout(seconds = 0.001)))
})

Try the analogsea package in your browser

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

analogsea documentation built on April 20, 2023, 1:34 a.m.