logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: cbd1760efac872c00edad15f352ffe4d2e0e1e12
parent 3a8b5d90df6de502debaee4d670211bcf64ad1db
Author: Alex Gleason <alex@alexgleason.me>
Date:   Sat, 22 Jan 2022 22:41:57 -0600

TransmogrifierTest: prepare an outgoing quote post

Diffstat:

Mtest/pleroma/web/activity_pub/transmogrifier_test.exs12++++++++++++
1 file 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 @@ -372,6 +372,18 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do } } = prepared["object"] 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 "actor rewriting" do