Skip to content

Commit

Permalink
Test that arrange() works correctly with data frame proxies (#6296)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan authored Jun 14, 2022
1 parent 74b9e93 commit 55dfc1c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-arrange.r
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ test_that("arrange handles S4 classes (#1105)", {
expect_equal(arrange(df, y), df[3:1, ])
})

test_that("arrange works with two columns when the first has a data frame proxy (#6268)", {
# `id1` has a data frame proxy for `vec_proxy_order()`
df <- tibble(
id1 = new_rcrd(list(x = 1, y = 1)),
id2 = c(1, 3, 2)
)

out <- arrange(df, id1, id2)

expect_identical(out$id2, c(1, 2, 3))
})

# locale --------------------------------------------------------------

test_that("arrange defaults to the C locale", {
Expand Down

0 comments on commit 55dfc1c

Please sign in to comment.