tests/testthat/test-nhl_teams_roster.R

test_that("NHL - Get NHL Teams Roster", {
  skip_on_cran()
  x <- nhl_teams_roster(team_id=14)

  cols <- c("jersey_number",
            "player_id",
            "player_full_name",
            "player_link",
            "position_code",
            "position_name",
            "position_type",
            "position_abbreviation",
            "team_id",
            "season")

  expect_equal(colnames(x), cols)
  expect_s3_class(x, 'data.frame')

})
benhowell71/fastRhockey documentation built on March 1, 2024, 9:23 a.m.