tests/testthat/test_deputies_get_data.R

test_that("result of function", {
  expect_equal(class(deputies_get_data("active", 7)), "data.frame")
})

test_that("result of function", {
  expect_equal(class(deputies_get_data("inactive", 8)), "data.frame")
})

test_that("columns of table", {
  expect_equal(ncol(deputies_get_data("active", 7)), 2)
})

test_that("columns of table", {
  expect_equal(ncol(deputies_get_data("inactive", 8)), 2)
})

test_that("rows of table", {
  expect_gt(nrow(deputies_get_data("active", 7)), 0)
})

test_that("rows of table", {
  expect_gt(nrow(deputies_get_data("inactive", 8)), 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.