TransmogrifierTest: prepare an outgoing quote post

This commit is contained in:
Alex Gleason 2022-01-22 22:41:57 -06:00 committed by tusooa
parent 3a8b5d90df
commit cbd1760efa
No known key found for this signature in database
GPG Key ID: 42AEC43D48433C51

View File

@ -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