tests/testthat/test_content_type.R

library(nomisr)
context("nomis_content_type")

test_that("nomis_content_type return expected format", {
  skip_on_cran()

  expect_error(nomis_content_type())

  content_id <- nomis_content_type("sources", "jsa")
  expect_true(nrow(content_id) == 1)
  expect_length(content_id, 4)
  expect_type(content_id, "list")
  expect_true(tibble::is_tibble(content_id))
})

Try the nomisr package in your browser

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

nomisr documentation built on June 11, 2022, 5:05 p.m.