httptest::with_mock_dir("f", {
test_that("function properties works", {
function_id <- "fwa_locatealong"
base_url <- "https://features.hillcrestgeo.ca/"
path <- "fwa"
x <- pgf_function_properties(function_id,
base_url = base_url,
path = path,
nocache = 'true'
)
expect_s3_class(x, "tbl_df")
expect_identical(nrow(x), 1L)
expect_identical(names(x), c("name", "type", "description"))
})
test_that("function parameters works", {
function_id <- "fwa_locatealong"
base_url <- "https://features.hillcrestgeo.ca/"
path <- "fwa"
x <- pgf_function_parameters(function_id,
base_url = base_url,
path = path,
nocache = 'true'
)
expect_s3_class(x, "tbl_df")
expect_identical(nrow(x), 2L)
expect_identical(names(x), c("name", "type", "description"))
})
test_that("function description works", {
function_id <- "fwa_locatealong"
base_url <- "https://features.hillcrestgeo.ca/"
path <- "fwa"
x <- pgf_function_description(function_id,
base_url = base_url,
path = path,
nocache = 'true'
)
expect_type(x, "character")
expect_length(x, 1L)
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.