Resolve follow activity from accept/reject without ID (#328)
[akkoma] / test / pleroma / web / activity_pub / object_validators / tag_validator_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ActivityPub.ObjectValidators.TagValidatorTest do
6 use Pleroma.DataCase, async: true
7
8 alias Pleroma.Web.ActivityPub.ObjectValidators.TagValidator
9
10 test "it doesn't error on unusual objects" do
11 edition = %{
12 "@context" => "https://www.w3.org/ns/activitystreams",
13 "type" => "Edition",
14 "work" => "https://bookwyrm.com/book/9"
15 }
16
17 assert %{valid?: true, action: :ignore} = TagValidator.cast_and_validate(edition)
18 end
19 end