test_that("Check good response", {
country <- "Spain"
city <- "Madrid"
postcode <- "28012"
state <- "Community of Madrid"
response <- reversegeo(40.414915938483574, -3.706841931806074)
expect_identical(response$country, country)
expect_identical(response$city, city)
expect_identical(response$postcode, postcode)
expect_identical(response$state, state)
})
test_that("Check error response", {
error <- "error"
response <- reversegeo(40.414915938483574, -Inf)
expect_equal(response$error, error)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.