summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-03-29 19:18:22 +0000
committerrinpatch <rinpatch@sdf.org>2020-04-02 23:00:23 +0300
commitb0a9a02af3edb28002b633030b3f6d63ae2309bf (patch)
tree452ae123ec98fc3360e6bea336e230c75af58978 /test/web/mastodon_api
parent01a3f145d51fe7aeb9050c89e03bebf10793aba3 (diff)
downloadpleroma-b0a9a02af3edb28002b633030b3f6d63ae2309bf.tar.gz
pleroma-b0a9a02af3edb28002b633030b3f6d63ae2309bf.zip
Merge branch 'feature/funkwhale-audio' into 'develop'
Add support for funkwhale Audio activity Closes #764 and #1624 See merge request pleroma/pleroma!2287
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r--test/web/mastodon_api/views/status_view_test.exs16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs
index 191895c6f..3e1812a1f 100644
--- a/test/web/mastodon_api/views/status_view_test.exs
+++ b/test/web/mastodon_api/views/status_view_test.exs
@@ -420,6 +420,22 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
assert length(represented[:media_attachments]) == 1
end
+ test "funkwhale audio" do
+ user = insert(:user)
+
+ {:ok, object} =
+ Pleroma.Object.Fetcher.fetch_object_from_id(
+ "https://channels.tests.funkwhale.audio/federation/music/uploads/42342395-0208-4fee-a38d-259a6dae0871"
+ )
+
+ %Activity{} = activity = Activity.get_create_by_object_ap_id(object.data["id"])
+
+ represented = StatusView.render("show.json", %{for: user, activity: activity})
+
+ assert represented[:id] == to_string(activity.id)
+ assert length(represented[:media_attachments]) == 1
+ end
+
test "a Mobilizon event" do
user = insert(:user)