without_internet({
expect_error(
httr::GET("http://httpbin.org/get"),
"GET http://httpbin.org/get"
)
expect_error(httr::PUT("http://httpbin.org/put",
body = '{"a":1}'
),
'PUT http://httpbin.org/put {"a":1}',
fixed = TRUE
)
})
Run the code above in your browser using DataLab