tests/testthat/test-options.R

test_that("options exist", {
  options <- getOption("idaifield_categories")
  expect_true(is.list(options))
})

test_that("lists are there and strict is shorter", {
  options <- getOption("idaifield_categories")
  expect_gt(length(options$layers), length(options$layers_strict))
})

test_that("layer is in the layerlist", {
  options <- getOption("idaifield_categories")
  expect_true(any(grepl("Layer", options$layers)))
})

test_that("lists are there and strict is shorter", {
  options <- getOption("idaifield_categories")
  expect_true(any(grepl("isDepictedIn", options$relations)))
})
lsteinmann/idaifieldR documentation built on April 3, 2025, 2:06 p.m.