tests/testthat/test-update_package.R

testthat::test_that("Update package", {
  temp_pkg_name <- "testPkg"
  temp_dir <- fs::path_temp()
  temp_project <- fs::path(temp_dir, temp_pkg_name)
  fs::dir_create(temp_project)

  })

testthat::test_that("Git repo renaming", {
  temp_pkg_name <- "testPkg"
  temp_dir <- fs::path_temp()
  temp_project <- fs::path(temp_dir, temp_pkg_name)
  fs::dir_create(temp_project)

  testthat::expect_error(
    object = change_default_git_branch(temp_project, "main"),
    regexp = "could not find repository from"
  )

})
luciorq/luciolib documentation built on Dec. 18, 2020, 11:43 a.m.