-
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
2 changed files
with
17 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
test_that("returns data in the expected format", { | ||
expect_s3_class(get_dataset_additional_info("weekly-accident-and-emergency-activity-and-waiting-times"), "tbl_df") | ||
}) | ||
|
||
test_that("returned tibble has one row", { | ||
expect_equal(nrow(get_dataset_additional_info("weekly-accident-and-emergency-activity-and-waiting-times")), 1) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
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(list_datasets(), 1)), 1) | ||
}) | ||
|
||
test_that("returns data in the expected format", { | ||
expect_s3_class(list_datasets(), "tbl_df") | ||
}) |