tests/testthat/test_rt_queue_properties.R

context("queue/properties")

test_that("we can get the properties of a queue", {
  testthat::skip_on_cran()
  skip_unless_integration()

  props <- rt_queue_properties("General")

  testthat::expect_is(props, "list")
  testthat::expect_length(props, 7)
  testthat::expect_true(props$Name == "General")
})

test_that("we throw an error on queue not found", {
  testthat::skip_on_cran()
  skip_unless_integration()

  testthat::expect_error(
    rt_queue_properties("AQueueThatDoesntExist"), "No queue")
})

Try the rt package in your browser

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

rt documentation built on May 15, 2021, 9:06 a.m.