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 | |
| 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')
| -rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 16 | ||||
| -rw-r--r-- | test/web/oauth/oauth_controller_test.exs | 2 |
2 files changed, 17 insertions, 1 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) diff --git a/test/web/oauth/oauth_controller_test.exs b/test/web/oauth/oauth_controller_test.exs index cff469c28..5f86d999c 100644 --- a/test/web/oauth/oauth_controller_test.exs +++ b/test/web/oauth/oauth_controller_test.exs @@ -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(), |
