tests/testthat/test-get_html_str.R

test_that("the `get_html_str()` function returns the expected output", {

  # Create a simple email object
  email <- compose_email(body = "test")

  # Expect that the extracted HTML message body
  # conforms to a regex pattern
  email %>%
    get_html_str() %>%
    expect_match("^<!doctype html>\n<html>\n.*test.*</html>$")
})
rich-iannone/blastula documentation built on Feb. 27, 2024, 9:55 p.m.