tests/testthat/test-mlb_sports_info.R

cols <- c(
  "sport_id", "sport_code", "sport_link", "sport_name", 
  "sport_abbreviation", "sort_order", "active_status"
)

test_that("MLB Sports Info", {
  skip_on_cran()
  
  x <- mlb_sports_info(sport_id=1)
  
  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.