tests/testthat/test-write-feature-layer.R

test_that("Feature Layer can be written from an sf object ", {
  skip("Must be ran interactively")
  skip_if_not_installed("sf")

  nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"))
  tkn <- auth_code()
  set_auth_token(tkn)
  res <- publish_layer(nc, "NC test")

  expect_null(res$services$success)
})


test_that("Table can be written from an sf object ", {
  skip("Must be ran interactively")
  tkn <- auth_code()
  set_auth_token(tkn)
  res <- publish_layer(iris, "Iris Test")
  expect_null(res$services$success)
})

Try the arcgislayers package in your browser

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

arcgislayers documentation built on May 29, 2024, 10:42 a.m.