Skip to content

Commit 127de77

Browse files
committed
test: fix auth test
1 parent 31343e3 commit 127de77

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/testthat/test-auth.R

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
test_that("get_api_key", {
22
withr::with_envvar(c(DELPHI_EPIDATA_KEY = "epidata_key_from_envvar"), {
3-
withr::with_options(list(delphi.epidata.key = "epidata_key_from_options"), {
4-
# option takes precedence over environment variable
5-
expect_identical(get_api_key(), "epidata_key_from_options")
6-
})
7-
})
8-
withr::with_envvar(c(DELPHI_EPIDATA_KEY = NA_character_), {
9-
withr::with_options(list(delphi.epidata.key = "epidata_key_from_options"), {
10-
# option by itself works:
11-
expect_identical(get_api_key(), "epidata_key_from_options")
12-
})
3+
expect_identical(get_api_key(), "epidata_key_from_envvar")
134
})
145
})

0 commit comments

Comments
 (0)