tests/testthat/test-mutate.R

context("mutate")

test_that("mutate modifies same column repeatedly (#243)", {
  dt <- data.table::data.table(x = 1)
  expect_equal(mutate(dt, x = x + 1, x = x + 1)$x, 3)
})
hadley/dtplyr documentation built on June 5, 2017, 12:01 p.m.