tests/testthat/test_votings_get_votings_table.R

test_that("result of function", {
  expect_equal(class(votings_get_votings_table("http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp?symbol=listaglos&IdDnia=1179")),
    "data.frame")
})

test_that("columns of table", {
  expect_equal(ncol(votings_get_votings_table("http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp?symbol=listaglos&IdDnia=1464")), 3)
})

test_that("rows of table", {
  expect_gt(nrow(votings_get_votings_table("http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp?symbol=listaglos&IdDnia=1324")), 0)
})

Try the sejmRP package in your browser

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

sejmRP documentation built on May 2, 2019, 5:16 a.m.