Skip to content

Commit c7ec656

Browse files
committed
add tests
1 parent 7e89588 commit c7ec656

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/testthat/test-dplyr_methods.R

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,27 @@ test_that("mutate counts", {
181181
expect_equal(TRUE)
182182

183183
})
184+
185+
test_that("group_split splits character columns", {
186+
data(pasilla)
187+
pasilla |>
188+
group_split(condition) |>
189+
length()
190+
expect_equal(2)
191+
})
192+
193+
test_that("group_split splits logical comparisons", {
194+
data(pasilla)
195+
pasilla |>
196+
group_split(counts > 0) |>
197+
length()
198+
expect_equal(2)
199+
})
200+
201+
test_that("group_split splits with mutliple arguments", {
202+
data(pasilla)
203+
pasilla |>
204+
group_split(condition, counts > 0) |>
205+
length()
206+
expect_equal(4)
207+
})

0 commit comments

Comments
 (0)