akkoma/test/pleroma/web/activity_pub/object_validators/tag_validator_test.exs

20 lines
632 B
Elixir
Raw Normal View History

2022-01-07 17:17:18 +00:00
# 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
2022-01-07 20:14:04 +00:00
test "it doesn't error on unusual objects" do
2022-01-07 17:17:18 +00:00
edition = %{
"@context" => "https://www.w3.org/ns/activitystreams",
"type" => "Edition",
"work" => "https://bookwyrm.com/book/9"
}
2022-01-07 20:14:04 +00:00
assert %{valid?: true, action: :ignore} = TagValidator.cast_and_validate(edition)
2022-01-07 17:17:18 +00:00
end
end