tests/testthat/test-http.R

test_that("renv handles unexpected user agent values", {

  # https://github.com/rstudio/renv/issues/1787
  renv_scope_options(HTTPUserAgent = character())
  agent <- renv_http_useragent()
  expect_equal(agent, renv_http_useragent_default())

  renv_scope_options(HTTPUserAgent = NULL)
  agent <- renv_http_useragent()
  expect_equal(agent, renv_http_useragent_default())

})

Try the renv package in your browser

Any scripts or data that you put into this service are public.

renv documentation built on May 29, 2024, 9:21 a.m.