1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 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
20 draft = %ActivityDraft{
24 content_html: "<h1>This is :moominmamma: note</h1>",
27 summary: "test summary",
29 extra: %{"custom_tag" => "test"},
34 "actor" => user.ap_id,
36 "cc" => [user3.ap_id],
37 "content" => "<h1>This is :moominmamma: note</h1>",
40 "summary" => "test summary",
42 "to" => [user2.ap_id],
44 "custom_tag" => "test",
45 "quoteUri" => quote.data["id"]
48 assert {:ok, ^expected, []} = Builder.note(draft)