Skip to content

Commit

Permalink
Add test of verification not adding location
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 21, 2024
1 parent 43f7bde commit 713dc52
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/testthat/test-location.R
Original file line number Diff line number Diff line change
Expand Up @@ -1195,3 +1195,18 @@ test_that("be chatty when pulling packets", {
expect_match(res$messages[[2]],
"Found 3 packets at 'server', of which 1 is new")
})


test_that("verify location on addition", {
root <- create_temporary_root()
path <- tempfile()

expect_error(
orderly_location_add_path("upstream", path = path, root = root))
expect_equal(orderly_location_list(root = root), "local")

expect_no_error(
orderly_location_add_path("upstream", path = path, verify = FALSE,
root = root))
expect_equal(orderly_location_list(root = root), c("local", "upstream"))
})

0 comments on commit 713dc52

Please sign in to comment.