Transmogrify outgoing nsfw.
[akkoma] / test / web / activity_pub / transmogrifier_test.exs
index ec608a86a019d710548720313c6e9e50ab90d3e8..6271e200edfdac094119c99ef32ad1071d3d9858 100644 (file)
@@ -120,6 +120,15 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
       assert Enum.member?(object["tag"], expected_mention)
     end
 
+    test "it adds the sensitive property" do
+      user = insert(:user)
+
+      {:ok, activity} = CommonAPI.post(user, %{"status" => "#nsfw hey"})
+      {:ok, modified} = Transmogrifier.prepare_outgoing(activity.data)
+
+      assert modified["object"]["sensitive"]
+    end
+
     test "it adds the json-ld context and the conversation property" do
       user = insert(:user)