diff options
author | mkljczk <git@mkljczk.pl> | 2025-02-17 17:55:03 +0100 |
---|---|---|
committer | mkljczk <git@mkljczk.pl> | 2025-02-17 17:55:03 +0100 |
commit | 120fbbc97e4430fb87749ca9271d318889dba7ff (patch) | |
tree | ba06f94284e2178c17dea0c792c1c3eb28a0ab20 /test | |
parent | ea01b5934f41a13f480221e554723f2b214d67e3 (diff) | |
download | pleroma-120fbbc97e4430fb87749ca9271d318889dba7ff.tar.gz pleroma-120fbbc97e4430fb87749ca9271d318889dba7ff.zip |
Include contentMap in outgoing posts
Signed-off-by: mkljczk <git@mkljczk.pl>
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/activity_pub/transmogrifier_test.exs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/transmogrifier_test.exs b/test/pleroma/web/activity_pub/transmogrifier_test.exs index ebf70b3e6..a25c6fe1b 100644 --- a/test/pleroma/web/activity_pub/transmogrifier_test.exs +++ b/test/pleroma/web/activity_pub/transmogrifier_test.exs @@ -639,5 +639,14 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do processed = Transmogrifier.prepare_object(original) assert processed["formerRepresentations"] == original["formerRepresentations"] end + + test "it uses contentMap to specify post language" do + user = insert(:user) + + {:ok, activity} = CommonAPI.post(user, %{status: "Cześć", language: "pl"}) + {:ok, modified} = Transmogrifier.prepare_object(activity.object.data) + + assert %{"contentMap" => %{"pl" => "Cześć"}} = modified["object"] + end end end |