tests/testthat/test-get_recent_late_contributions_committee.R

context("get_recent_late_contributions_committee")

test_that("testing errors", {
  expect_error(get_recent_late_contributions_committee(2016, 575050), 'FEC_ID has to be character')
  expect_warning(expect_error(get_recent_late_contributions_committee(1995, 'C00575050'), 'Incorrect cycle'), "Cycle should be four-digit year larger than 1996")
  expect_warning(expect_error(get_recent_late_contributions_committee(16, 'C00575050'), '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.