ObjectValidators.BareUriTest: Replace calls of SafeText to BareUri

This commit is contained in:
Haelwenn (lanodan) Monnier 2023-11-08 00:28:26 +01:00
parent 8076deeeb4
commit 76c070fe86
2 changed files with 3 additions and 4 deletions

View File

View File

@ -6,7 +6,6 @@ defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.BareUriTest do
use Pleroma.DataCase, async: true use Pleroma.DataCase, async: true
alias Pleroma.EctoType.ActivityPub.ObjectValidators.BareUri alias Pleroma.EctoType.ActivityPub.ObjectValidators.BareUri
alias Pleroma.EctoType.ActivityPub.ObjectValidators.SafeText
test "diaspora://" do test "diaspora://" do
text = "diaspora://alice@fediverse.example/post/deadbeefdeadbeefdeadbeefdeadbeef" text = "diaspora://alice@fediverse.example/post/deadbeefdeadbeefdeadbeefdeadbeef"
@ -19,8 +18,8 @@ test "nostr:" do
end end
test "errors for non-URIs" do test "errors for non-URIs" do
assert :error == SafeText.cast(1) assert :error == BareUri.cast(1)
assert :error == SafeText.cast("foo") assert :error == BareUri.cast("foo")
assert :error == SafeText.cast("foo bar") assert :error == BareUri.cast("foo bar")
end end
end end