diff --git a/tests/testthat/test-seek_data.R b/tests/testthat/test-seek_data.R index 5d3183906..01bff9807 100644 --- a/tests/testthat/test-seek_data.R +++ b/tests/testthat/test-seek_data.R @@ -70,3 +70,8 @@ test_that("seek_variables - multiple pattern", { expect_identical(out$index, which(colnames(efc) %in% out$column)) expect_identical(out$labels, c("elder's gender", "elder's dependency")) }) + +test_that("seek_variables - valid input", { + expect_error(seek_variables(rnorm(10), "Length"), regex = "`data` must be a data frame.") + expect_error(seek_variables(iris, "Length", search = "somewhere"), regex = "`search` must be") +})