projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into refactor/notification_settings
[akkoma]
/
test
/
web
/
activity_pub
/
object_validators
/
types
/
object_id_test.exs
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 f4c5ed1dc0c720148b7f96e83e7cf0a883ba76c5..e0ab7637944e522638ed5eb5a10b7906db7d69c2 100644
(file)
--- 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 <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.ObjectValidators.Types.ObjectIDTest do
defmodule Pleroma.Web.ObjectValidators.Types.ObjectIDTest do
- alias Pleroma.
Web.ActivityPub.ObjectValidators.Type
s.ObjectID
+ alias Pleroma.
EctoType.ActivityPub.ObjectValidator
s.ObjectID
use Pleroma.DataCase
@uris [
use Pleroma.DataCase
@uris [
@@
-10,13
+14,12
@@
defmodule Pleroma.Web.ObjectValidators.Types.ObjectIDTest do
@non_uris [
"https://",
@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)
test "it accepts http uris" do
Enum.each(@uris, fn uri ->
assert {:ok, uri} == ObjectID.cast(uri)