Skip to content

Commit

Permalink
update test, use gert::git_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Faye-yufan committed Jul 6, 2024
1 parent 7778b1e commit a33e5b0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/testthat/test-compiler-ghpages.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ test_that("animint2pages() default branch is gh-pages", {
local_repo_path <- tempfile(pattern = "repo_clone_")
gert::git_clone(url = paste0("https://github.com/", owner, "/animint2pages_test_repo.git"), path = local_repo_path)
# Check the default branch after clone
head_file <- file.path(local_repo_path, ".git", "HEAD")
head_content <- readLines(head_file)
if (startsWith(head_content, "ref: refs/heads/")) {
default_branch <- sub("ref: refs/heads/", "", head_content)
} else {
default_branch <- NA
}
default_branch <- gert::git_branch(repo = local_repo_path)
expect_equal(default_branch, "gh-pages")
})

0 comments on commit a33e5b0

Please sign in to comment.