diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-12-23 13:59:06 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-12-23 14:00:54 +0000 |
commit | a2bceaf688608f61151e298e6025ccbecc9de227 (patch) | |
tree | afa75987f6595df3805e9897f5b141624dbdea37 /test | |
parent | 34a4ed22c4904270b1c5c2acab09e995d9a8d6dd (diff) | |
download | pleroma-a2bceaf688608f61151e298e6025ccbecc9de227.tar.gz |
tests: twitter api: add test proving that peertube videos are correctly handled
Diffstat (limited to 'test')
-rw-r--r-- | test/web/twitter_api/views/activity_view_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/twitter_api/views/activity_view_test.exs b/test/web/twitter_api/views/activity_view_test.exs index 09d7a18d4..fd511b546 100644 --- a/test/web/twitter_api/views/activity_view_test.exs +++ b/test/web/twitter_api/views/activity_view_test.exs @@ -265,4 +265,18 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do assert result == expected end + + test "a peertube video" do + {:ok, object} = + ActivityPub.fetch_object_from_id( + "https://peertube.moe/videos/watch/df5f464b-be8d-46fb-ad81-2d4c2d1630e3" + ) + + %Activity{} = activity = Activity.get_create_activity_by_object_ap_id(object.data["id"]) + + result = ActivityView.render("activity.json", activity: activity) + + assert length(result["attachments"]) == 1 + assert result["summary"] == "Friday Night" + end end |