-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
64 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
test_that("returns more than 0 datasets", { | ||
# select the first row of the tibble and get the | ||
# number of rows. If no datasets were returned | ||
# this will be 0 | ||
expect_equal(nrow(dplyr::slice(get_latest_resource("gp-practice-populations"), 1)), 1) | ||
test_that("returns data for a dataset that is listed", { | ||
expect_no_error(get_latest_resource("gp-practice-populations")) | ||
}) | ||
|
||
test_that("returns data in the expected format", { | ||
expect_s3_class(get_latest_resource("gp-practice-populations"), "tbl_df") | ||
test_that("returns error for a dataset that is not listed", { | ||
expect_error(get_latest_resource("hospital-codes")) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
test_that("returns data for a dataset that is listed", { | ||
expect_no_error(get_latest_resource_id("gp-practice-populations")) | ||
expect_no_error(get_latest_resource("gp-practice-populations")) | ||
}) | ||
|
||
test_that("returns error for a dataset that is not listed", { | ||
expect_error(get_latest_resource_id("hospital-codes"), "The dataset name supplied `hospital-codes` is not within the applicable datasets") | ||
expect_error(get_latest_resource("hospital-codes")) | ||
}) |