tests/testthat/test-ggmap_data.R

## Data for tests ----

df <- data.frame(matrix(1:21, nrow = 1))
colnames(df) <- get_required_columns()


## ggmap_data() ----

test_that("Test ggmap_data() for success", {
  expect_silent({
    gg <- ggmap_data(df)
  })

  expect_true("gg" %in% class(gg))
  expect_true("ggplot" %in% class(gg))

  vdiffr::expect_doppelganger("Map data", gg)
})

Try the forcis package in your browser

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

forcis documentation built on June 8, 2025, 10:37 a.m.