summaryrefslogtreecommitdiff
path: root/test/pleroma/web/activity_pub/object_validators/tag_validator_test.exs
blob: 443dd308d0db12702208697402125e1febccbab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

defmodule Pleroma.Web.ActivityPub.ObjectValidators.TagValidatorTest do
  use Pleroma.DataCase, async: true

  alias Pleroma.Web.ActivityPub.ObjectValidators.TagValidator

  test "it doesn't error on unusual objects" do
    edition = %{
      "@context" => "https://www.w3.org/ns/activitystreams",
      "type" => "Edition",
      "work" => "https://bookwyrm.com/book/9"
    }

    assert %{valid?: true, action: :ignore} = TagValidator.cast_and_validate(edition)
  end
end