diff options
| author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-03-29 19:18:22 +0000 |
|---|---|---|
| committer | rinpatch <rinpatch@sdf.org> | 2020-04-02 23:00:23 +0300 |
| commit | b0a9a02af3edb28002b633030b3f6d63ae2309bf (patch) | |
| tree | 452ae123ec98fc3360e6bea336e230c75af58978 /test/web/mastodon_api | |
| parent | 01a3f145d51fe7aeb9050c89e03bebf10793aba3 (diff) | |
| download | pleroma-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.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) |
