Skip to content

Commit

Permalink
Merge pull request #169 from inbo/fix-test-errrors
Browse files Browse the repository at this point in the history
Fix errors in tests download dataset function
  • Loading branch information
damianooldoni committed Aug 18, 2021
2 parents cf16f50 + b6d64c1 commit ad52eb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-download_dataset-message.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Summary statistics for dataset "2014_demer":
* number of animals: 16
* number of tags: 16
* number of detections: 237064
* number of deployments: 859
* number of deployments: 884
* number of receivers: 124
* first date of detection: 2014-04-18
* last date of detection: 2018-09-15
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-download_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ test_that("Downloading the data package returns desired message and files", {
# Function returns no result
expect_null(evaluate_download_2014_demer$result)

# Function returns no output
expect_true(evaluate_download_2014_demer$output == "")
# Function returns a verbose output of length 1
expect_equal(length(evaluate_download_2014_demer$output), 1)
expect_true(evaluate_download_2014_demer$output[1] != "")

# Remove generated files and directories after test
unlink(dir_to_download_data, recursive = TRUE)
Expand Down

0 comments on commit ad52eb9

Please sign in to comment.