tests/testthat/test_update_item_1_args.R

context("update_item - Arguments")

name <- "Paycheck"
amount <- 1000
day <- "2016-01-01"
recurring <- "monthly"
paycheck <- create_item(name, amount, day, recurring)

test_that("Check - item", {
  expect_error(update_item(),
               "Please provide a budget item to update")
  expect_error(update_item(item=1),
               "item must be a budget item")
})
derek-damron/budgetr documentation built on Aug. 11, 2020, 2:41 a.m.