diff options
author | tusooa <tusooa@kazv.moe> | 2022-10-27 12:51:29 +0000 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2022-10-27 12:51:29 +0000 |
commit | 9fbf01f7a928465406335034b23c10605aa2189a (patch) | |
tree | 034e21be089d0bc44f714f79b37ed63e5a711b95 /test | |
parent | 7a519b6a6607bc1dd22e6a3450aebf0f1ff11fb8 (diff) | |
parent | 1b238a4fadd50811b1cce64812858c101e790c60 (diff) |
Merge branch 'push-updates' into 'develop'
Push.Impl: support edits
See merge request pleroma/pleroma!3760
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/push/impl_test.exs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/pleroma/web/push/impl_test.exs b/test/pleroma/web/push/impl_test.exs index b8112cce5..2eee0acd9 100644 --- a/test/pleroma/web/push/impl_test.exs +++ b/test/pleroma/web/push/impl_test.exs @@ -202,6 +202,21 @@ defmodule Pleroma.Web.Push.ImplTest do "New Reaction" end + test "renders title and body for update activity" do + user = insert(:user) + + {:ok, activity} = CommonAPI.post(user, %{status: "lorem ipsum"}) + + {:ok, activity} = CommonAPI.update(user, activity, %{status: "edited status"}) + object = Object.normalize(activity, fetch: false) + + assert Impl.format_body(%{activity: activity, type: "update"}, user, object) == + "@#{user.nickname} edited a status" + + assert Impl.format_title(%{activity: activity, type: "update"}) == + "New Update" + end + test "renders title for create activity with direct visibility" do user = insert(:user, nickname: "Bob") |