tests/testthat/test-scan_groups.R

context("test-scan_groups")

test_that("scan-groups works", {

  data(iris)

  # Test if there are numeric variables
  res <- scan_groups(iris)
  expect_is(res, class = "data.frame")

  # Test if there is not numeric variable
  expect_error(scan_groups(iris[1:4]),
               "There should be categorical column in .data")
})
BenjaminLouis/datascan documentation built on May 26, 2019, 1:35 p.m.