mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Validator Test: Small refactor.
This commit is contained in:
parent
643f15e77b
commit
aebec1bac9
1 changed files with 4 additions and 5 deletions
|
@ -10,13 +10,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)
|
||||
|
|
Loading…
Reference in a new issue