X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Factivity_pub%2Fobject_validators%2Ftypes%2Fobject_id_test.exs;h=e0ab7637944e522638ed5eb5a10b7906db7d69c2;hb=4a306720e8be8633e192f7b2c98f129a315939b9;hp=f4c5ed1dc0c720148b7f96e83e7cf0a883ba76c5;hpb=643f15e77b7cdaaf2c22a876c98e5680edc32dc3;p=akkoma diff --git a/test/web/activity_pub/object_validators/types/object_id_test.exs b/test/web/activity_pub/object_validators/types/object_id_test.exs index f4c5ed1dc..e0ab76379 100644 --- a/test/web/activity_pub/object_validators/types/object_id_test.exs +++ b/test/web/activity_pub/object_validators/types/object_id_test.exs @@ -1,5 +1,9 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2020 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Pleroma.Web.ObjectValidators.Types.ObjectIDTest do - alias Pleroma.Web.ActivityPub.ObjectValidators.Types.ObjectID + alias Pleroma.EctoType.ActivityPub.ObjectValidators.ObjectID use Pleroma.DataCase @uris [ @@ -10,13 +14,12 @@ defmodule Pleroma.Web.ObjectValidators.Types.ObjectIDTest do @non_uris [ "https://", - "rin" + "rin", + 1, + :x, + %{"1" => 2} ] - test "it rejects integers" do - assert :error == ObjectID.cast(1) - end - test "it accepts http uris" do Enum.each(@uris, fn uri -> assert {:ok, uri} == ObjectID.cast(uri)