Nothing
test_that("ESPN CFB Team Awards", {
skip_on_cran()
cols <- c(
"season", "team_id", "award_id", "award_name", "award_description",
"athlete_id", "winner_team_id", "award_ref", "athlete_ref",
"winner_team_ref"
)
# The attach helper enriches both team_id and winner_team_id.
team_detail_cols <- c(
"team_name", "team_abbreviation", "team_location", "team_display_name",
"team_short_display_name", "team_nickname", "team_color",
"team_alternate_color", "team_logo_href", "team_logo_dark_href",
"winner_team_name", "winner_team_abbreviation", "winner_team_location",
"winner_team_display_name", "winner_team_short_display_name",
"winner_team_nickname", "winner_team_color", "winner_team_alternate_color",
"winner_team_logo_href", "winner_team_logo_dark_href"
)
x <- espn_cfb_team_awards(team_id = 61, year = 2024)
y <- espn_cfb_team_awards(team_id = 61, year = 2023)
if (is.null(x) || !is.data.frame(x) || nrow(x) == 0) {
skip("No ESPN team awards data returned at test time")
}
expect_in(cols, colnames(x))
expect_in(cols, colnames(y))
expect_s3_class(x, "data.frame")
expect_s3_class(y, "data.frame")
# team_detail = TRUE (default) attaches the friendly team columns.
expect_in(team_detail_cols, colnames(x))
# team_detail = FALSE reproduces the un-enriched output.
z <- espn_cfb_team_awards(team_id = 61, year = 2024, team_detail = FALSE)
expect_in(cols, colnames(z))
expect_false(any(team_detail_cols %in% colnames(z)))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.