File: test-check.R

package info (click to toggle)
r-cran-devtools 2.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,328 kB
  • sloc: sh: 15; makefile: 5
file content (15 lines) | stat: -rw-r--r-- 739 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
test_that("can determine when to document", {
  expect_false(can_document(list()))
  # TODO: switch to expect_snapshot()
  suppressMessages(expect_message(
    expect_false(can_document(list(roxygennote = "15.0.00"))),
    "doesn't match required"
  ))
  expect_true(can_document(list(roxygennote = packageVersion("roxygen2"))))
})

test_that("fail instead of sending an email to wrong recipient", {
  # The testTest package has both Authors@R and Maintainer field - this causes problems in change_maintainer_email().
  # The function checks if the provided email is actually the one in the maintainer field instead of sending the report to the wrong recipient
  expect_error(check_win_release(path("testTest"), email = "foo@bar.com"))
})