tests/testthat/test-dimmensions.R

context("dimmensions")


test_that("returns proper number of rows and columns", {
  skip_on_cran()
  expect_equal(ncol(christmas_mojo), 9)
  expect_equal(ncol(christmas_num), 9)

  expect_equal(dim(boxoffice(dates = as.Date("2017-12-25"),
                             top_n = 10)), c(10, 9))

  expect_equal(ncol(boxoffice(dates = christmas, site = "mojo")), 9)
  expect_equal(dim(boxoffice(dates = christmas, top_n = 10)), c(20, 9))
  expect_equal(dim(boxoffice(dates = christmas,
                             site = "mojo", top_n = 10)), c(20, 9))
})

Try the boxoffice package in your browser

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

boxoffice documentation built on May 2, 2019, 3:26 p.m.