Fix digest test
authorTusooa Zhu <tusooa@kazv.moe>
Wed, 2 Mar 2022 01:27:45 +0000 (20:27 -0500)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 29 Jun 2022 19:45:05 +0000 (20:45 +0100)
test/mix/tasks/pleroma/digest_test.exs

index 4a9e461a9fb21b00abe66315baeaca4ec59aa3a3..b8050c7afe14f54111c26db112ec78081a80a079 100644 (file)
@@ -53,7 +53,13 @@ defmodule Mix.Tasks.Pleroma.DigestTest do
 
       assert_email_sent(
         to: {user2.name, user2.email},
-        html_body: ~r/here is what you've missed!/i
+        html_body:
+          Regex.compile!(
+            "here is what you've missed!"
+            |> Phoenix.HTML.html_escape()
+            |> Phoenix.HTML.safe_to_string(),
+            "i"
+          )
       )
     end
   end