aboutsummaryrefslogtreecommitdiff
path: root/test/pleroma/web/common_api
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-10-13 14:27:50 -0500
committerMark Felder <feld@FreeBSD.org>2020-12-11 17:22:42 -0600
commitf8c93246d69a193ead81248879ba260e98673b3d (patch)
tree493fdc9f2b3b4b2aa0734db6a2d7f9fd1b81ac7f /test/pleroma/web/common_api
parentb2548cfcdabdcb90bfcc9f4022c0b1cff9157a4a (diff)
downloadpleroma-f8c93246d69a193ead81248879ba260e98673b3d.tar.gz
Refactor Earmark code, fix tests
Diffstat (limited to 'test/pleroma/web/common_api')
-rw-r--r--test/pleroma/web/common_api/utils_test.exs10
1 files changed, 5 insertions, 5 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