From 36e86d5e85376edca903f9c12005b735790f001d Mon Sep 17 00:00:00 2001 From: Julia Silge Date: Thu, 2 Mar 2023 12:46:26 -0700 Subject: [PATCH] Switch to better http service for testing --- tests/testthat/_snaps/pin.md | 8 ++++---- tests/testthat/test-pin.R | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/testthat/_snaps/pin.md b/tests/testthat/_snaps/pin.md index 7c047545e..7203d7d0c 100644 --- a/tests/testthat/_snaps/pin.md +++ b/tests/testthat/_snaps/pin.md @@ -1,17 +1,17 @@ # unavailable url can use cache Code - pin("http://httpstat.us/404", "test", board = board) + pin("http://httpbin.org/status/404", "test", board = board) Condition Error in `pin()`: - ! Client error: (404) Not Found. Failed to download remote file: http://httpstat.us/404 + ! Client error: (404) Not Found. Failed to download remote file: http://httpbin.org/status/404 Code pin(1:10, "test", board = board) - x <- pin("http://httpstat.us/404", "test", board = board) + x <- pin("http://httpbin.org/status/404", "test", board = board) Condition Warning: Failed to re-download pin; using cached value - * Client error: (404) Not Found. Failed to download remote file: http://httpstat.us/404 + * Client error: (404) Not Found. Failed to download remote file: http://httpbin.org/status/404 Code expect_equal(x, 1:10) diff --git a/tests/testthat/test-pin.R b/tests/testthat/test-pin.R index cbf35ee96..1c44e58f6 100644 --- a/tests/testthat/test-pin.R +++ b/tests/testthat/test-pin.R @@ -70,9 +70,9 @@ test_that("unavailable url can use cache", { board <- legacy_temp() expect_snapshot(error = TRUE, { - pin("http://httpstat.us/404", "test", board = board) + pin("http://httpbin.org/status/404", "test", board = board) pin(1:10, "test", board = board) - x <- pin("http://httpstat.us/404", "test", board = board) + x <- pin("http://httpbin.org/status/404", "test", board = board) expect_equal(x, 1:10) }) })