diff options
author | rinpatch <rinpatch@sdf.org> | 2019-06-09 13:55:32 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-06-09 13:55:32 +0300 |
commit | 3ecfe2a6d4874cc6f7873c3d8c76f25d6b83829a (patch) | |
tree | 50fe70940473a5cd40093c1c53650135e24ab651 /test | |
parent | bf391569cf83c3dec75fe1a6870ae0b9f228400b (diff) | |
parent | b9544d565d42cd0705f6f583b328d1034ae8ae97 (diff) | |
download | pleroma-3ecfe2a6d4874cc6f7873c3d8c76f25d6b83829a.tar.gz pleroma-3ecfe2a6d4874cc6f7873c3d8c76f25d6b83829a.zip |
Merge branch 'develop' into feature/releases
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/transmogrifier_test.exs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs index 28971ae45..cc1781403 100644 --- a/test/web/activity_pub/transmogrifier_test.exs +++ b/test/web/activity_pub/transmogrifier_test.exs @@ -60,6 +60,22 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do assert returned_object.data["inReplyToAtomUri"] == "https://shitposter.club/notice/2827873" end + test "it does not crash if the object in inReplyTo can't be fetched" do + data = + File.read!("test/fixtures/mastodon-post-activity.json") + |> Poison.decode!() + + object = + data["object"] + |> Map.put("inReplyTo", "https://404.site/whatever") + + data = + data + |> Map.put("object", object) + + {:ok, _returned_activity} = Transmogrifier.handle_incoming(data) + end + test "it works for incoming notices" do data = File.read!("test/fixtures/mastodon-post-activity.json") |> Poison.decode!() |