From ef52aa0e6647d00f5ff984d655ef4b27ab3e6b1a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 26 Apr 2019 22:38:56 +0000 Subject: [PATCH] tests: fix up for changed bbcode library output and verify html is properly escaped --- test/web/common_api/common_api_utils_test.exs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs index df9955d5d..ab4c62b35 100644 --- a/test/web/common_api/common_api_utils_test.exs +++ b/test/web/common_api/common_api_utils_test.exs @@ -128,7 +128,16 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do assert output == expected text = "[b]hello world![/b]\n\nsecond paragraph!" - expected = "hello world!

second paragraph!" + expected = "hello world!
\n
\nsecond paragraph!" + + {output, [], []} = Utils.format_input(text, "text/bbcode") + + assert output == expected + + text = "[b]hello world![/b]\n\nsecond paragraph!" + + expected = + "hello world!
\n
\n<strong>second paragraph!</strong>" {output, [], []} = Utils.format_input(text, "text/bbcode") -- 2.45.2