tests/testthat/test-get_subscribed_metadata.R

test_that("`get_subscribed_metadata()` runs without error", {
  skip_if_offline()

  result <- get_subscribed_metadata()

  expect_s3_class(result, "tbl")

  expect_identical(names(result), c("item_number", "item_name", "metadata"))

  # Tests to be run with valid API key, with at least one subscribed item
  expect_true(nrow(result) > 0)
})

Try the trud package in your browser

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

trud documentation built on Sept. 12, 2024, 7:39 a.m.