Skip to content

Commit ab04969

Browse files
committed
fix header test
1 parent 037b240 commit ab04969

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/testthat/test-proof_header.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
test_that("proof_header", {
44
# errors if no env var set and no string supplied
5-
expect_error(proof_header(request("")), "token not found")
5+
withr::with_envvar(new = c("PROOF_TOKEN" = ""), {
6+
expect_error(proof_header(request("")), "token not found")
7+
})
68

79
# returns token if given
810
expect_match(proof_header(request(""), "adf")$headers[[1]], "adf")

0 commit comments

Comments
 (0)