Skip to content

Commit 6ac375f

Browse files
committed
Work on windows
1 parent df89bea commit 6ac375f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/testthat/test-oauth.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,16 @@ test_that("can override path with env var", {
233233
})
234234

235235
test_that("inlined legacy path matches rappdirs", {
236-
expect_equal(oauth_cache_path_legacy(), rappdirs::user_cache_dir("httr2"))
236+
expect_equal(
237+
normalizePath(oauth_cache_path_legacy(), mustWork = FALSE),
238+
normalizePath(rappdirs::user_cache_dir("httr2"), mustWork = FALSE)
239+
)
237240
})
238241

239242
test_that("legacy path respects R_USER_CACHE_DIR", {
240243
withr::local_envvar("R_USER_CACHE_DIR" = withr::local_tempdir())
241-
expect_equal(oauth_cache_path_legacy(), rappdirs::user_cache_dir("httr2"))
244+
expect_equal(
245+
normalizePath(oauth_cache_path_legacy(), mustWork = FALSE),
246+
normalizePath(rappdirs::user_cache_dir("httr2"), mustWork = FALSE)
247+
)
242248
})

0 commit comments

Comments
 (0)