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.ObjectValidators.ArticleNoteValidatorTest do
6 use Pleroma.DataCase, async: true
8 alias Pleroma.Web.ActivityPub.ObjectValidators.ArticleNoteValidator
9 alias Pleroma.Web.ActivityPub.Utils
11 import Pleroma.Factory
18 "id" => Utils.generate_activity_id(),
20 "actor" => user.ap_id,
21 "to" => [user.follower_address],
23 "content" => "Hellow this is content.",
28 %{user: user, note: note}
31 test "a basic note validates", %{note: note} do
32 %{valid?: true} = ArticleNoteValidator.cast_and_validate(note)