tests/testthat/test-request_make.R

test_that("request_make() errors for invalid HTTP methods", {
  expect_snapshot(
    request_make(list(method = httr::GET)),
    error = TRUE
  )
  expect_snapshot(
    request_make(list(method = "PETCH")),
    error = TRUE
  )
})

Try the gargle package in your browser

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

gargle documentation built on July 26, 2023, 5:29 p.m.