test_that("The parameter must be a data frame", {
  expect_error(
    .deactivate(dataframe = 1)
  )
})

test_that("Iris gets deactivated", {
  dataframe_ <- .activate(dataframe = iris)
  
  checkmate::expect_data_frame(
    .deactivate(dataframe = dataframe_))
})

test_that("The END_DATE column is present", {
  dataframe_ <- .activate(dataframe = iris)
  dataframe_ <- .deactivate(dataframe = dataframe_)
  
  expect_true(
    any(names(.deactivate(dataframe = dataframe_)) == "END_DATE"))
  expect_true(
    all(!is.null(dataframe_["END_DATE"])))
})

test_that("The IS_ACTIVE column is present", {
  dataframe_ <- .activate(dataframe = iris)
  dataframe_ <- .deactivate(dataframe = dataframe_)
  
  expect_true(
    any(names(.deactivate(dataframe = dataframe_)) == "IS_ACTIVE"))
  expect_true(
    all(dataframe_$IS_ACTIVE == FALSE))
})
