tests/testthat/test_election_candidates.R

library(hansard)
context("election_candidates")


test_that("election_candidates return expected format", {
  skip_on_cran()
  skip_if(Sys.getenv(x = "TRAVIS_R_VERSION_STRING") == "devel")
  # skip_on_travis()

  xec <- hansard_election_candidates(ID = 650517, verbose = TRUE)
  expect_length(xec, 13)
  expect_type(xec, "list")
  expect_true(tibble::is_tibble(xec))
  expect_equal(nrow(xec), 10)
})
evanodell/hansard documentation built on Oct. 10, 2021, 9:52 a.m.