diff options
author | Thomas Citharel <tcit@tcit.fr> | 2019-12-17 16:16:21 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2019-12-17 16:16:21 +0100 |
commit | d2f1c4f658a8c995716aee3876cb46a0f48f99cb (patch) | |
tree | 511c593641a9c08d45ab8b53cc4c8b7beb1fcdc0 /test/web | |
parent | 38ad407395e838ddf1c11922806adc080af44d36 (diff) | |
download | pleroma-d2f1c4f658a8c995716aee3876cb46a0f48f99cb.tar.gz pleroma-d2f1c4f658a8c995716aee3876cb46a0f48f99cb.zip |
Add ActivityPub Object Event type support
Adds Event support in the same way Video objects are handled, with the
name of the object as message header.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
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 = [ |