tests/testthat/test_req.R

library(jug)

context("testing Request class")

jug_req<-Request$new(RawTestRequest$new()$req)

test_that("A variable is correctly attached to a request",{
  jug_req$attach("testkey", "test")

  expect_equal(jug_req$params$testkey, "test")
})

Try the jug package in your browser

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

jug documentation built on May 1, 2019, 10:31 p.m.