X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fcommon_api%2Fcommon_api_utils_test.exs;h=45fc94522da749bf48dadd1094e5a66ced7be457;hb=69341cbcbac2459faa43bb924577e84dac353982;hp=4b761e0395aef71b52f0ee1c717b1745c99fdc22;hpb=5b62acf6e9a38f8d14a9fb37cc85e646fb0169e3;p=akkoma
diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs
index 4b761e039..45fc94522 100644
--- a/test/web/common_api/common_api_utils_test.exs
+++ b/test/web/common_api/common_api_utils_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
hello world!
\n\nsecond paragraph
" - expected = "hello world!
\n\nsecond paragraph
" + text = "hello world!
second paragraph
" + expected = "hello world!
second paragraph
" {output, [], []} = Utils.format_input(text, "text/html") @@ -99,14 +99,14 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do test "works for bare text/markdown" do text = "**hello world**" - expected = "hello world
\n" + expected = "hello world
" {output, [], []} = Utils.format_input(text, "text/markdown") assert output == expected text = "**hello world**\n\n*another paragraph*" - expected = "hello world
\nanother paragraph
\n" + expected = "hello world
another paragraph
" {output, [], []} = Utils.format_input(text, "text/markdown") @@ -118,7 +118,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do by someone """ - expected = "\ncool quote
\n
by someone
\n" + expected = "cool quote
by someone
" {output, [], []} = Utils.format_input(text, "text/markdown") @@ -134,7 +134,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do assert output == expected text = "[b]hello world![/b]\n\nsecond paragraph!" - expected = "hello world!hello world
\nanother @user__test and @user__test google.com paragraph
\n) - {output, _, _} = Utils.format_input(text, "text/markdown") - assert output == expected + assert output == + ~s(hello world
another @user__test and @user__test google.com paragraph
) end end @@ -575,11 +573,11 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do end describe "maybe_add_attachments/3" do - test "returns parsed results when no_links is true" do + test "returns parsed results when attachment_links is false" do assert Utils.maybe_add_attachments( {"test", [], ["tags"]}, [], - true + false ) == {"test", [], ["tags"]} end @@ -589,7 +587,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do assert Utils.maybe_add_attachments( {"test", [], ["tags"]}, [attachment], - false + true ) == { "test