tests/testthat/test-get_organization_data.R

test_that("get_organization_data works", {
  skip_on_os(c("windows", "linux", "solaris"))
  testthat::skip_if_offline()
  testthat::skip_if(Sys.getenv("PURPLE_AIR_API_KEY") == "", "no PurpleAir API key present")
  skip_on_cran()
  od <- get_organization_data()
  expect_equal(length(od$organization_name), 1)
  expect_true(is.character(od$organization_id))
})

Try the PurpleAir package in your browser

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

PurpleAir documentation built on Oct. 9, 2024, 1:07 a.m.