tests/testthat/test-mlb_game_content.R

cols <- c(
  "title", "epg_id", "content_id", "media_id", "media_state", 
  "media_feed_type", "media_feed_sub_type", "call_letters", 
  "fox_auth_required", "tbs_auth_required", "espn_auth_required",
  "fs1auth_required", "mlbn_auth_required", "free_game", "type",
  "description", "rendition_name", "language"
)

test_that("MLB Game Content", {
  skip_on_cran()
  
  x <- mlb_game_content(game_pk = 566001)
  
  expect_equal(colnames(x), cols)
  expect_s3_class(x, "data.frame")
})

Try the baseballr package in your browser

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

baseballr documentation built on April 1, 2023, 12:12 a.m.