Skip to content

Commit

Permalink
Update regex check for img to account for potentional role attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Mar 21, 2024
1 parent 233db49 commit 86eefbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test-zzzz-include.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test_that("Includes work", {

res <- PlumberResponse$new()
val <- r$route(make_req("GET", "/rmd"), res)
expect_match(val$body, "<html.*<img src=\"data:image/png;base64.*</html>\\s*$")
expect_match(val$body, "<html.*<img (role=\"img\" )?src=\"data:image/png;base64.*</html>\\s*$")
expect_equal(val$headers$`Content-Type`, "text/html; charset=UTF-8")
}
})

0 comments on commit 86eefbd

Please sign in to comment.