httptest::with_mock_dir("cp", {
test_that("collection properties works", {
base_url <- "https://features.hillcrestgeo.ca/"
path <- "fwa"
collection_id <- "whse_basemapping.fwa_wetlands_poly"
x <- pgf_collection_properties(
collection_id = collection_id,
base_url = base_url,
path = path,
nocache = 'true'
)
expect_s3_class(x, "tbl_df")
expect_identical(names(x), c("name", "type", "description"))
})
test_that("collection properties can return response", {
base_url <- "https://features.hillcrestgeo.ca/"
path <- "fwa"
collection_id <- "whse_basemapping.fwa_wetlands_poly"
x <- pgf_collection_properties(
collection_id = collection_id,
base_url = base_url,
path = path,
response = TRUE,
nocache = 'true'
)
expect_s3_class(x, "pgfs_request")
expect_s3_class(x$response, "response")
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.