tests/testthat/test_vottes_match_deputies_ids.R

test_that("result of function", {
  expect_equal(class(votes_match_deputies_ids("sejmrp", "reader", "qux94874", "services.mini.pw.edu.pl",
    "http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp?symbol=klubglos&IdGlosowania=37494&KodKlubu=PO", 7,
    .Platform$OS.type == "windows")),
    "data.frame")
})

test_that("columns of table", {
  expect_equal(ncol(votes_match_deputies_ids("sejmrp", "reader", "qux94874", "services.mini.pw.edu.pl",
    "http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp?symbol=klubglos&IdGlosowania=37494&KodKlubu=SLD", 7,
    .Platform$OS.type == "windows")), 3)
})

test_that("rows of table", {
  expect_gt(nrow(votes_match_deputies_ids("sejmrp", "reader", "qux94874", "services.mini.pw.edu.pl",
    "http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp?symbol=klubglos&IdGlosowania=37494&KodKlubu=PiS", 7,
    .Platform$OS.type == "windows")), 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.