tests/testthat/test_votings_get_date.R

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

test_that("format YYYY-MM-DD", {
  # expect_output(votings_get_date("http://www.sejm.gov.pl/Sejm7.nsf/agent.xsp?symbol=listaglos&IdDnia=1179"),
  #   "[0-9]{4}-[0-9]{2}-[0-9]{2}")
})


test_that("length", {
  expect_equal(length(votings_get_date("http://www.sejm.gov.pl/Sejm8.nsf/agent.xsp?symbol=listaglos&IdDnia=1491")), 1)
})

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.