tests/testthat/test-get_committee_filings.R

context("get_committee_filings")

test_that("testing errors", {
  expect_error(get_committee_filings(553560, 2016), 'FEC_ID has to be character')
  expect_warning(expect_error(get_committee_filings('C00553560', 1995), 'Incorrect cycle'), "Cycle should be four-digit year larger than 1996")
  expect_warning(expect_error(get_committee_filings('C00553560', 16), 'Incorrect cycle'), 'Cycle should be four-digit year')
})

Try the ProPublicaR package in your browser

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

ProPublicaR documentation built on Sept. 8, 2023, 5:53 p.m.