tests/testthat/test-injection.R

context("Injection")

test_that("Injected arguments on req$args get passed on.", {
  r <- pr(test_path("files/filter-inject.R"))

  expect_equal(r$call(make_req("GET", "/"))$body, jsonlite::toJSON(13))
})
rstudio/plumber documentation built on April 12, 2025, 7:33 p.m.