test_that("audit plan explains selected and skipped tests", {
  plan <- audit_plan(mpg ~ wt + hp, data = mtcars, focus = "wt")
  expect_s3_class(plan, "data.frame")
  expect_true(all(c("id", "status", "reason") %in% names(plan)))
  expect_true(any(plan$status == "SELECTED"))
  expect_true(any(plan$status == "SKIPPED"))
})

test_that("registry is available", {
  reg <- witness_registry()
  expect_s3_class(reg, "data.frame")
  expect_true(nrow(reg) >= 10L)
  expect_true(all(c("id", "models", "purpose") %in% names(reg)))
})


test_that("bare focus variable is supported", {
  dat <- transform(mtcars, transmission = factor(am))
  out <- statwitness(mpg ~ transmission + wt, data = dat, focus = transmission)
  expect_identical(out$focus, "transmission")
})
