test_that("The `create_rmd_preview_message()` function works properly", { # Create an HTML string for the .Rmd preview message rmd_preview_html <- create_rmd_preview_message(subject = "Connect test message") # Expect a certain pattern for the HTML string rmd_preview_html %>% expect_match( paste0( "^
", "

", "This is an email preview for RStudio Connect

", "

Connect test message


$" ) ) })