tests/testthat/test-find_qty_var.R

context("find_qty_var")

test_that("stop if not found", {

  expect_error(
    find_qty_var(
      dplyr::select(test_data, -foo_qty)),
    "matching")

})

test_that("return if found", {

  expect_equal(
    find_qty_var(test_data),
    "foo_qty")

})
BAAQMD/vartools documentation built on May 20, 2020, 1:35 a.m.