From b1f86e41bd997ce4ea26dcb0a656b591a7768548 Mon Sep 17 00:00:00 2001 From: Kiernan Nicholls Date: Fri, 12 Jan 2024 15:10:58 -0500 Subject: [PATCH] Adjust tests for end of 2023 season --- CRAN-SUBMISSION | 3 +++ DESCRIPTION | 2 +- NEWS.md | 3 ++- cran-comments.md | 2 +- tests/testthat/test-best.R | 2 +- tests/testthat/test-events.R | 4 ++-- 6 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 CRAN-SUBMISSION diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 0000000..7929d70 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 2.2.1 +Date: 2024-01-12 20:11:38 UTC +SHA: 8143003625d36d803c54e1b6ea5fa03b8e9de8fb diff --git a/DESCRIPTION b/DESCRIPTION index 7b77822..db5e914 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: fflr Title: Retrieve ESPN Fantasy Football Data -Version: 2.2.0.9002 +Version: 2.2.1 Authors@R: person("Kiernan", "Nicholls", , "kiernann@protonmail.com", role = c("aut", "cre", "cph")) Description: Format the raw data from the ESPN fantasy football API diff --git a/NEWS.md b/NEWS.md index 326c5aa..360f397 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ -# fflr (development version) +# fflr 2.2.1 +* Adjust tests for end of NFL season. * The functions `league_members()` and `league_teams()` have been adjusted to add new columns. The order of columns has also been rearranged to focus on the output of each function (all teams or all members), since some teams can diff --git a/cran-comments.md b/cran-comments.md index 986bbf7..3806f55 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -14,4 +14,4 @@ ## Resubmission -* Fixed broken link to https://kiernann.com/fflr in README +* Updated test to account for end of the 2023 NFL season. diff --git a/tests/testthat/test-best.R b/tests/testthat/test-best.R index a3a2f81..8860916 100644 --- a/tests/testthat/test-best.R +++ b/tests/testthat/test-best.R @@ -17,7 +17,7 @@ test_that("calculate best possible future roster", { b <- best_roster( leagueId = "42654852", useScore = "projectedScore", - scoringPeriodId = ffl_week() + scoringPeriodId = 1 ) b2 <- b[[2]] expect_s3_class(b2, "data.frame") diff --git a/tests/testthat/test-events.R b/tests/testthat/test-events.R index b14e631..e1e2739 100644 --- a/tests/testthat/test-events.R +++ b/tests/testthat/test-events.R @@ -1,8 +1,8 @@ test_that("get NFL game schedule times", { e <- pro_events() expect_s3_class(e, "data.frame") - expect_type(e$competitors, "list") - expect_length(e, 13) + # expect_type(e$competitors, "list") + expect_length(e, 7) }) test_that("get NFL game scores", {