Skip to content

Commit

Permalink
cover validate_character
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Jun 5, 2024
1 parent 2429d5e commit 6f40bba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/testthat/test-field.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ test_that("select fields", {
validate_field(new_select_field(1, letters)),
class = "string_failure"
)

expect_error(
validate_field(new_select_field(1:3, LETTERS, multiple = TRUE)),
class = "string_failure"
)
})

test_that("range fields", {
Expand Down Expand Up @@ -76,7 +81,7 @@ test_that("numeric fields", {
class = "range_failure"
)

value(field, "test")
value(field) <- "test"
expect_error(
validate_field(field),
class = "number_failure"
Expand Down

0 comments on commit 6f40bba

Please sign in to comment.