Skip to content

Commit

Permalink
test: adding tests that it fails if the dir_create arg is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay committed Sep 6, 2024
1 parent c157318 commit 44b6ef2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/testthat/test-add_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ test_add_file <- function(
)
unlink(output)
expect_error(fun())
expect_error(
fun(
file_sans_extension,
open = FALSE,
dir_create = TRUE
)
)
fun(
file_sans_extension,
open = FALSE
Expand Down
7 changes: 7 additions & 0 deletions tests/testthat/test-use_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ test_that(
mapply(
function(fun, ext) {
unlink(paste0("this.", ext))
expect_error({
fun(
url = paste0("this.", ext),
pkg = ".",
dir_create = TRUE
)
})
path_to_file <- fun(
url = paste0("this.", ext),
pkg = "."
Expand Down

0 comments on commit 44b6ef2

Please sign in to comment.