summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-06-08 22:54:47 -0400
committerMark Felder <feld@feld.me>2024-06-08 22:54:59 -0400
commitf000dab372993e1cbd494535b82c248d44595ab5 (patch)
tree61a3a6bb959e8029dcdc801ef9dce745a070c1e0
parent8468d78882fb004eb5f64e6e0a0dca1ef3284c93 (diff)
downloadpleroma-f000dab372993e1cbd494535b82c248d44595ab5.tar.gz
pleroma-f000dab372993e1cbd494535b82c248d44595ab5.zip
Switch test case to Impl.build_content/3
-rw-r--r--test/pleroma/web/push/impl_test.exs6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/pleroma/web/push/impl_test.exs b/test/pleroma/web/push/impl_test.exs
index 969c7a605..c263a1280 100644
--- a/test/pleroma/web/push/impl_test.exs
+++ b/test/pleroma/web/push/impl_test.exs
@@ -239,7 +239,7 @@ defmodule Pleroma.Web.Push.ImplTest do
{:ok, [notification]} = Notification.create_poll_notifications(activity)
- assert Impl.format_title(notification) == "Poll Results"
+ expected_title = "Poll Results"
expected_body =
"""
@@ -250,7 +250,9 @@ defmodule Pleroma.Web.Push.ImplTest do
"""
|> String.trim_trailing("\n")
- assert Impl.format_body(notification, user, question) == expected_body
+ content = Impl.build_content(notification, user, question)
+
+ assert match?(%{title: ^expected_title, body: ^expected_body}, content)
end
describe "build_content/3" do