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\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 Aug. 6, 2021, 9:05 a.m.