tests/testthat/test-Appenders.R

# test nonsense email address
test_that("testsendmail correct", {
  to <- "bla"
  subject <- "testing this mail"
  body <- "Dear sir madam, I hope this test finds you well. Sincerely, John Doe"
  expect_error(testSendMail(to, subject, body))
})

# test if output is produced
test_that("testsendmail correct", {
  to <- "johndoe@gmail.com"
  subject <- "testing this mail"
  body <- "Dear sir madam, I hop this test finds you well. Sincerely, John Doe"
  expect_output(testSendMail(to, subject, body))
})

Try the ParallelLogger package in your browser

Any scripts or data that you put into this service are public.

ParallelLogger documentation built on Aug. 22, 2023, 5:11 p.m.