tests/testthat/test-toa_sports_scores.R

cols <- c(
  "id",
  "sport_key",
  "sport_title",
  "commence_time",
  "completed",
  "home_team",
  "away_team",
  "scores",
  "last_update"
)

test_that("The Odds API - Scores", {
  skip_on_cran()
  # skip_on_ci()
  x <- toa_sports_scores(sport_key = 'basketball_ncaab', 
                         days_from = NULL,
                         date_format = 'iso')
  
  expect_equal(colnames(x), cols)
  expect_s3_class(x, "data.frame")
})

Try the oddsapiR package in your browser

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

oddsapiR documentation built on March 31, 2023, 5:27 p.m.