tests/testthat/test-tables.R

test_that("List of tables make sense", {
  expect_equivalent(unique(sp_tables), sp_tables)
  expect_equivalent(unique(sp_tables$id), sp_tables$id)
  expect_equivalent(unique(sp_tables$id), sp_tables$id)
  expect_equivalent(sort(sp_tables$id), sp_tables$id)
  expect_equivalent(dplyr::distinct(sp_tables), sp_tables)
})

test_that("get_table works", {
  expect_error(sp_get_table("blah", "2012", "12"))
})

Try the statnipokladna package in your browser

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

statnipokladna documentation built on Dec. 28, 2022, 2:36 a.m.