diff options
author | Alex Gleason <alex@alexgleason.me> | 2022-01-22 22:41:57 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2022-01-22 22:41:57 -0600 |
commit | 00b2dc7ecb061f320b30bb696f88c100019511a9 (patch) | |
tree | aa89a11a58e0c3d644ca2419112e5b4aa63ac67e | |
parent | bbd3433f5af8c3aa9774131bafd951e0bd1e3d80 (diff) |
TransmogrifierTest: prepare an outgoing quote post
-rw-r--r-- | test/pleroma/web/activity_pub/transmogrifier_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/transmogrifier_test.exs b/test/pleroma/web/activity_pub/transmogrifier_test.exs index 244dd7167..bae8f1d5e 100644 --- a/test/pleroma/web/activity_pub/transmogrifier_test.exs +++ b/test/pleroma/web/activity_pub/transmogrifier_test.exs @@ -323,6 +323,18 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do assert url == "http://localhost:4001/emoji/dino%20walking.gif" end + + test "it prepares a quote post" do + user = insert(:user) + + {:ok, quoted_post} = CommonAPI.post(user, %{status: "hey"}) + {:ok, quote_post} = CommonAPI.post(user, %{status: "hey", quote_id: quoted_post.id}) + + {:ok, modified} = Transmogrifier.prepare_outgoing(quote_post.data) + + quoted_post = Object.normalize(quoted_post) + assert modified["object"]["quoteUrl"] == quoted_post.data["id"] + end end describe "user upgrade" do |