mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
TransmogrifierTest: prepare an outgoing quote post
This commit is contained in:
parent
3a8b5d90df
commit
cbd1760efa
1 changed files with 12 additions and 0 deletions
|
@ -372,6 +372,18 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
||||||
}
|
}
|
||||||
} = prepared["object"]
|
} = prepared["object"]
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
describe "actor rewriting" do
|
describe "actor rewriting" do
|
||||||
|
|
Loading…
Reference in a new issue