diff options
author | rinpatch <rinpatch@sdf.org> | 2019-12-17 15:31:10 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-12-17 15:31:10 +0000 |
commit | d23a80e6911a85e2377ad2336a050e0206c74db9 (patch) | |
tree | b8e5a62f79d6e78f7ccc0e63ddacafb21868a83b /test/web | |
parent | 086250ac5be17af26be4ad47d55a447ee0dd5101 (diff) | |
parent | d2f1c4f658a8c995716aee3876cb46a0f48f99cb (diff) | |
download | pleroma-d23a80e6911a85e2377ad2336a050e0206c74db9.tar.gz |
Merge branch 'feature/add-event-support' into 'develop'
Add ActivityPub Object Event type support
See merge request pleroma/pleroma!2075
Diffstat (limited to 'test/web')
-rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 15 |
1 files changed, 15 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 bdd87a79e..17b6ebcbc 100644 --- a/test/web/mastodon_api/views/status_view_test.exs +++ b/test/web/mastodon_api/views/status_view_test.exs @@ -394,6 +394,21 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do assert length(represented[:media_attachments]) == 1 end + test "a Mobilizon event" do + user = insert(:user) + + {:ok, object} = + Pleroma.Object.Fetcher.fetch_object_from_id( + "https://mobilizon.org/events/252d5816-00a3-4a89-a66f-15bf65c33e39" + ) + + %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) + end + describe "build_tags/1" do test "it returns a a dictionary tags" do object_tags = [ |