1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ActivityPub.BuilderTest do
6 alias Pleroma.Web.ActivityPub.Builder
7 alias Pleroma.Web.CommonAPI.ActivityDraft
10 import Pleroma.Factory
13 test "returns note data" do
19 draft = %ActivityDraft{
23 content_html: "<h1>This is :moominmamma: note</h1>",
26 summary: "test summary",
28 extra: %{"custom_tag" => "test"}
32 "actor" => user.ap_id,
34 "cc" => [user3.ap_id],
35 "content" => "<h1>This is :moominmamma: note</h1>",
38 "summary" => "test summary",
40 "to" => [user2.ap_id],
42 "custom_tag" => "test"
45 assert {:ok, ^expected, []} = Builder.note(draft)