Skip to content

Commit

Permalink
test: include tests for the internal get_ helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjohnst86 committed Mar 8, 2024
1 parent e61db27 commit 537232a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-get-variables.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test_that("internal `get_` variable helper functions give correct output", {

# Should be character. Not sure if other tests are needed here.
expect_type(get_register_abbrev(), "character")
expect_type(get_required_variables("bef"), "character")

# Only able to use register ids that are real.
expect_error(get_required_variables("fake"))

# Only allows a vector of one.
expect_error(get_required_variables(c("bef", "atc")))
})

0 comments on commit 537232a

Please sign in to comment.