test_that("hoopR Loader NBA Schedule", {
skip_on_cran()
x <- load_nba_schedule(seasons = most_recent_nba_season())
cols <- c(
"id",
"uid",
"date",
"attendance",
"time_valid",
"neutral_site",
"conference_competition",
"play_by_play_available",
"recent",
"start_date",
"notes_type",
"notes_headline",
"broadcast_market",
"broadcast_name",
"type_id",
"type_abbreviation",
"venue_id",
"venue_full_name",
"venue_address_city",
"venue_capacity",
"venue_indoor",
"status_clock",
"status_display_clock",
"status_period",
"status_type_id",
"status_type_name",
"status_type_state",
"status_type_completed",
"status_type_description",
"status_type_detail",
"status_type_short_detail",
"format_regulation_periods",
"home_id",
"home_uid",
"home_location",
"home_name",
"home_abbreviation",
"home_display_name",
"home_short_display_name",
"home_color",
"home_alternate_color",
"home_is_active",
"home_venue_id",
"home_logo",
"home_score",
"home_winner",
"home_linescores",
"home_records",
"away_id",
"away_uid",
"away_location",
"away_name",
"away_abbreviation",
"away_display_name",
"away_short_display_name",
"away_color",
"away_alternate_color",
"away_is_active",
"away_venue_id",
"away_logo",
"away_score",
"away_winner",
"away_linescores",
"away_records",
"game_id",
"season",
"season_type",
"venue_address_state",
"status_type_alt_detail",
"game_json",
"game_json_url",
"game_date_time",
"game_date",
"PBP",
"team_box",
"player_box"
)
expect_equal(sort(colnames(x)), sort(cols))
expect_s3_class(x, "data.frame")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.