tests/testthat/test.nhl_teams.R

context("nhl_teams")

testthat::test_that(
  "nhl_teams retrieves 2 teams", {
    testthat::skip_if_offline(host = "nhl.com")
    testthat::skip_if(skipRemoteTests)

    testthat::expect_equal(
      nhl_teams(teamIds = 1:2)[, c("id", "name", "link")],
      teams_processed[, c("id", "name", "link")]
    )
  }
)

Try the nhlapi package in your browser

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

nhlapi documentation built on Feb. 20, 2021, 9:06 a.m.