aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/common_api/utils_test.exs10
-rw-r--r--test/pleroma/web/common_api_test.exs2
2 files changed, 6 insertions, 6 deletions
diff --git a/test/pleroma/web/common_api/utils_test.exs b/test/pleroma/web/common_api/utils_test.exs
index c6abbbe84..ab6392b1f 100644
--- a/test/pleroma/web/common_api/utils_test.exs
+++ b/test/pleroma/web/common_api/utils_test.exs
@@ -178,13 +178,13 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
test "raw HTML" do
code = ~s[<a href="http://example.org/">OwO</a><!-- what's this?-->]
{result, [], []} = Utils.format_input(code, "text/markdown")
- assert result == "<p>#{code}</p>"
+ assert result == ~s[<a href="http://example.org/">OwO</a>]
end
test "rulers" do
code = ~s[before\n\n-----\n\nafter]
{result, [], []} = Utils.format_input(code, "text/markdown")
- assert result == "<p>before</p><hr /><p>after</p>"
+ assert result == "<p>before</p><hr/><p>after</p>"
end
test "blockquote" do
@@ -204,7 +204,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
code = ~s[```\nputs "Hello World"\n```]
{result, [], []} = Utils.format_input(code, "text/markdown")
- assert result == ~s[<pre><code class="">puts &quot;Hello World&quot;</code></pre>]
+ assert result == ~s[<pre><code>puts &quot;Hello World&quot;</code></pre>]
end
test "lists" do
@@ -227,9 +227,9 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
assert result == ~s[<p><strong>aaaa~</strong></p>]
# strikethrough
- code = ~s[<del>aaaa~</del>]
+ code = ~s[~~aaaa~~~]
{result, [], []} = Utils.format_input(code, "text/markdown")
- assert result == ~s[<p><del>aaaa~</del></p>]
+ assert result == ~s[<p><del>aaaa</del>~</p>]
end
end
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index 585b2c174..c1b1af073 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -558,7 +558,7 @@ defmodule Pleroma.Web.CommonAPITest do
object = Object.normalize(activity)
- assert object.data["content"] == "<p><b>2hu</b></p>alert(&#39;xss&#39;)"
+ assert object.data["content"] == "<p><b>2hu</b></p>"
assert object.data["source"] == post
end