tests/testthat/test-openapi.R

test_that("OpenAPI specification works", {
  pr <- plumber::plumb(pr_path())
  spec <- pr$getApiSpec()
  for (path in spec$paths) {
    if (!is.null(path$post)) {
      expect_match(path$post$requestBody$description, "^<h3[^>]*>Tableau Request</h3>\n+<p>This is a mock Tableau request.")
    }
  }
})

Try the plumbertableau package in your browser

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

plumbertableau documentation built on May 29, 2024, 9:58 a.m.