summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-04-29 08:13:10 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-04-29 08:13:10 +0300
commit7bd187bc5e2e589f3ba639bbc0ab2feea905a9b0 (patch)
treee1efa4655196fd37c9dce50712a3ad84faa7cd32 /test
parentea5142b94bcd1a02571776440dc828dd08a2c3d6 (diff)
downloadpleroma-7bd187bc5e2e589f3ba639bbc0ab2feea905a9b0.tar.gz
pleroma-7bd187bc5e2e589f3ba639bbc0ab2feea905a9b0.zip
added test
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/transmogrifier_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs
index 0404aae6a..0800305ce 100644
--- a/test/web/activity_pub/transmogrifier_test.exs
+++ b/test/web/activity_pub/transmogrifier_test.exs
@@ -1221,6 +1221,17 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
:error = Transmogrifier.handle_incoming(data)
end
+ test "skip converting the content when it is nil" do
+ object_id = "https://peertube.social/videos/watch/278d2b7c-0f38-4aaa-afe6-9ecc0c4a34fe"
+
+ {:ok, object} = Fetcher.fetch_and_contain_remote_object_from_id(object_id)
+
+ result =
+ Pleroma.Web.ActivityPub.Transmogrifier.fix_object(Map.merge(object, %{"content" => nil}))
+
+ assert result["content"] == nil
+ end
+
test "it converts content of object to html" do
object_id = "https://peertube.social/videos/watch/278d2b7c-0f38-4aaa-afe6-9ecc0c4a34fe"