1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ActivityPub.Transmogrifier.EventHandlingTest do
6 use Oban.Testing, repo: Pleroma.Repo
9 alias Pleroma.Object.Fetcher
11 test "Mobilizon Event object" do
13 %{url: "https://mobilizon.org/events/252d5816-00a3-4a89-a66f-15bf65c33e39"} ->
16 body: File.read!("test/fixtures/tesla_mock/mobilizon.org-event.json")
19 %{url: "https://mobilizon.org/@tcit"} ->
22 body: File.read!("test/fixtures/tesla_mock/mobilizon.org-user.json")
26 assert {:ok, object} =
27 Fetcher.fetch_object_from_id(
28 "https://mobilizon.org/events/252d5816-00a3-4a89-a66f-15bf65c33e39"
31 assert object.data["to"] == ["https://www.w3.org/ns/activitystreams#Public"]
32 assert object.data["cc"] == []
34 assert object.data["url"] ==
35 "https://mobilizon.org/events/252d5816-00a3-4a89-a66f-15bf65c33e39"
37 assert object.data["published"] == "2019-12-17T11:33:56Z"
38 assert object.data["name"] == "Mobilizon Launching Party"