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
This commit is contained in:
Haelwenn (lanodan) Monnier 2020-03-11 12:21:44 +01:00
commit 863ec33ba2
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
7 changed files with 124 additions and 4 deletions

View file

@ -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)

View file

@ -581,7 +581,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
# In case scope param is missing, expecting _all_ app-supported scopes to be granted
for user <- [non_admin, admin],
{requested_scopes, expected_scopes} <-
%{scopes_subset => scopes_subset, nil => app_scopes} do
%{scopes_subset => scopes_subset, nil: app_scopes} do
conn =
post(
build_conn(),