diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2020-03-11 12:21:44 +0100 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2020-03-11 13:46:42 +0100 |
commit | 863ec33ba2a90708d199f18683ffe0c4658c710a (patch) | |
tree | ff232102f8b007fa16f70aab434df17073783c9b /test/web/mastodon_api | |
parent | 841e4e4d835b8d1cecb33102356ca045571ef1fc (diff) | |
download | pleroma-863ec33ba2a90708d199f18683ffe0c4658c710a.tar.gz pleroma-863ec33ba2a90708d199f18683ffe0c4658c710a.zip |
Add support for funkwhale Audio activity
reel2bits fixture not included as it lacks the Actor fixture for it.
Closes: https://git.pleroma.social/pleroma/pleroma/issues/1624
Closes: https://git.pleroma.social/pleroma/pleroma/issues/764
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 16 |
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) |