mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-10-02 08:11:55 +00:00
added test
This commit is contained in:
parent
ea5142b94b
commit
7bd187bc5e
1 changed files with 11 additions and 0 deletions
|
@ -1221,6 +1221,17 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
||||||
:error = Transmogrifier.handle_incoming(data)
|
:error = Transmogrifier.handle_incoming(data)
|
||||||
end
|
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
|
test "it converts content of object to html" do
|
||||||
object_id = "https://peertube.social/videos/watch/278d2b7c-0f38-4aaa-afe6-9ecc0c4a34fe"
|
object_id = "https://peertube.social/videos/watch/278d2b7c-0f38-4aaa-afe6-9ecc0c4a34fe"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue