Skip to content

Commit

Permalink
test: create_golem with git
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay committed Sep 6, 2024
1 parent 7cd0148 commit ecfc33a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/testthat/test-create_golem.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,33 @@ test_that("create_golem can remove comments", {
)
})

test_that("create_golem with git works", {
dir <- tempfile(pattern = "golemcreategolemfail")

withr::with_options(
c("usethis.quiet" = TRUE),
{
dir <- create_golem(
dir,
with_git = TRUE,
open = FALSE,
package_name = "testpkg"
)
}
)
expect_exists(
file.path(
dir,
".git"
)
)
unlink(
dir,
TRUE,
TRUE
)
})

test_that("create_golem_gui works", {
testthat::with_mocked_bindings(
create_golem = function(...) {
Expand Down

0 comments on commit ecfc33a

Please sign in to comment.