tests/testthat/test-get-code.R

test_that("get code at", {
  dtOut <- readRDS(system.file("test-data", "codeAt.rds", package = "norgeo"))
  expect_equal(get_code(type = "fylke", 2018), dtOut)
})

test_that("get codes - all", {
  vcr::use_cassette("codes-fromto", {
    dt <- get_code(type = "fylke", from = 2016, to = 2018, names = F)
  })

  expect_equal(dt, outDT)
})

Try the norgeo package in your browser

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

norgeo documentation built on Aug. 15, 2023, 5:06 p.m.