tests/testthat/test_constituencies.R

library(hansard)
context("constituencies")

test_that("constituencies functions return expected format", {
  skip_on_cran()
  skip_on_travis()

  ctx <- hansard_constituencies(current = TRUE, verbose = TRUE)
  expect_length(ctx, 7)
  expect_true(tibble::is_tibble(ctx))
  expect_equal(nrow(ctx), 650)
  expect_true(names(ctx)[6] == "started_date_value")
})

Try the hansard package in your browser

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

hansard documentation built on Nov. 13, 2019, 5:06 p.m.