mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-05 08:31:36 +00:00
ObjectValidators.BareUriTest: Replace calls of SafeText to BareUri
This commit is contained in:
parent
8076deeeb4
commit
76c070fe86
2 changed files with 3 additions and 4 deletions
0
changelog.d/bare_uri_test.skip
Normal file
0
changelog.d/bare_uri_test.skip
Normal 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 @@ defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.BareUriTest 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
|
||||||
|
|
Loading…
Reference in a new issue