summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2023-11-08 14:13:37 +0000
committerfeld <feld@feld.me>2023-11-08 14:13:37 +0000
commit0f56304f09b5cc43e7c8cf37aab629aed30abfda (patch)
tree590c69843d95b9c9609431ae38d32305d06008c8
parentcfc01a660a7b47578d0b163272ca6cd84d50890a (diff)
parent76c070fe8641f5519ca42dfcecdab3f47d882e8f (diff)
downloadpleroma-0f56304f09b5cc43e7c8cf37aab629aed30abfda.tar.gz
pleroma-0f56304f09b5cc43e7c8cf37aab629aed30abfda.zip
Merge branch 'bare_uri_test' into 'develop'
Activate test for object validator that has not been running See merge request pleroma/pleroma!3968
-rw-r--r--changelog.d/bare_uri_test.skip0
-rw-r--r--test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs (renamed from test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.ex)10
2 files changed, 5 insertions, 5 deletions
diff --git a/changelog.d/bare_uri_test.skip b/changelog.d/bare_uri_test.skip
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/changelog.d/bare_uri_test.skip
diff --git a/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.ex b/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs
index 226383c3c..760ecb465 100644
--- a/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.ex
+++ b/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs
@@ -9,17 +9,17 @@ defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.BareUriTest do
test "diaspora://" do
text = "diaspora://alice@fediverse.example/post/deadbeefdeadbeefdeadbeefdeadbeef"
- assert {:ok, text} = BareUri.cast(text)
+ assert {:ok, ^text} = BareUri.cast(text)
end
test "nostr:" do
text = "nostr:note1gwdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
- assert {:ok, text} = BareUri.cast(text)
+ assert {:ok, ^text} = BareUri.cast(text)
end
test "errors for non-URIs" do
- assert :error == SafeText.cast(1)
- assert :error == SafeText.cast("foo")
- assert :error == SafeText.cast("foo bar")
+ assert :error == BareUri.cast(1)
+ assert :error == BareUri.cast("foo")
+ assert :error == BareUri.cast("foo bar")
end
end