Skip to content

Commit

Permalink
Ensure no template for now
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 13, 2023
1 parent 5ee272e commit 947c471
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/testthat/test-orderly.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,12 @@ test_that("allow creation of orderly.R in existing empty dir", {
"Created 'src/foo/orderly.R'")
expect_true(file.exists(file.path(path, "src/foo/orderly.R")))
})


test_that("disallow template arguments", {
path <- test_prepare_orderly_example(character())
expect_error(
orderly_new("foo", template = "other", root = path),
"'template' must be 'NULL' or 'FALSE' for now")
expect_false(file.exists(file.path(path, "src/foo")))
})

0 comments on commit 947c471

Please sign in to comment.