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))
})
trestletech/plumber documentation built on March 16, 2024, 8:21 a.m.