tests/testthat/test-is_unique_colum.R

test_that("returns TRUE for a column with unique values", {
  data_frame <- data.frame(id = c(1, 2, 3, 4, 5))
  expect_true(is_unique_column("id", data_frame))
})

test_that("returns FALSE for a column with duplicate values", {
  data_frame <- data.frame(id = c(1, 2, 3, 4, 5, 1))
  expect_false(is_unique_column("id", data_frame))
})

Try the vvauditor package in your browser

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

vvauditor documentation built on Jan. 19, 2026, 5:08 p.m.