Skip to content

Commit

Permalink
test: wrap known warning from {desc} into expect_warning()
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Oct 7, 2024
1 parent 0cb9d38 commit 569fba1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/testthat/test-build-home-index.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ test_that("cran_unquote works", {

test_that("allow email in BugReports", {
# currently desc throws a warning if BugReports is an email
pkg <- local_pkgdown_site(desc = list(BugReports = "[email protected]"))
expect_warning(
pkg <- local_pkgdown_site(desc = list(BugReports = "[email protected]")),
"must be a http"
)
html <- xml2::read_html(data_home_sidebar(pkg))
expect_snapshot(xpath_xml(html, ".//li/a"))
})

0 comments on commit 569fba1

Please sign in to comment.