aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/formatter_test.exs7
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs7
2 files changed, 14 insertions, 0 deletions
diff --git a/test/formatter_test.exs b/test/formatter_test.exs
index ff882f8f1..4c65b26f2 100644
--- a/test/formatter_test.exs
+++ b/test/formatter_test.exs
@@ -34,6 +34,13 @@ defmodule Pleroma.FormatterTest do
assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
+ text = "https://mastodon.social:4000/@lambadalambda"
+
+ expected =
+ "<a href='https://mastodon.social:4000/@lambadalambda'>https://mastodon.social:4000/@lambadalambda</a>"
+
+ assert Formatter.add_links({[], text}) |> Formatter.finalize() == expected
+
text = "@lambadalambda"
expected = "@lambadalambda"
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 2c9cdd194..5d39c25c6 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -564,6 +564,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
user_three = insert(:user, %{nickname: "shp@heldscal.la", name: "I love 2hu"})
{:ok, activity} = CommonAPI.post(user, %{"status" => "This is about 2hu"})
+
+ {:ok, _activity} =
+ CommonAPI.post(user, %{
+ "status" => "This is about 2hu, but private",
+ "visibility" => "private"
+ })
+
{:ok, _} = CommonAPI.post(user_two, %{"status" => "This isn't"})
conn =