Skip to content

Commit 064948e

Browse files
committed
Add test
1 parent 734bb0c commit 064948e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/testthat/test-utilities.r

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,16 @@ test_that("cut_*() checks its input and output", {
127127
test_that("interleave() checks the vector lengths", {
128128
expect_snapshot_error(interleave(1:4, numeric()))
129129
})
130+
131+
test_that("vec_rbind0 can combined ordered factors with warning", {
132+
# Should give exactly 1 warning, not multiple
133+
expect_silent(
134+
expect_warning(
135+
vec_rbind0(
136+
data_frame0(a = factor(c("A", "B"), ordered = TRUE)),
137+
data_frame0(a = factor(c("B", "C"), ordered = TRUE))
138+
),
139+
"Combining variables of class <ordered> and <ordered> was deprecated"
140+
)
141+
)
142+
})

0 commit comments

Comments
 (0)