aboutsummaryrefslogtreecommitdiff
path: root/test/web/twitter_api/twitter_api_controller_test.exs
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2018-04-29 09:26:47 +0000
committerlambda <pleromagit@rogerbraun.net>2018-04-29 09:26:47 +0000
commitb7584edcea024739fcef1ce6608058766d9fd73f (patch)
tree526d08731dd4efd6fc38f55b7bdf8807c9dc29e2 /test/web/twitter_api/twitter_api_controller_test.exs
parent4d55d7c95e8409f5018f3321d7e653b6349b9ba6 (diff)
parent6908f29e0a170131d2f328d68d36f054b592a0a3 (diff)
downloadpleroma-b7584edcea024739fcef1ce6608058766d9fd73f.tar.gz
Merge branch 'patch-bio' into 'develop'
replace newlines in profiles with <br> See merge request pleroma/pleroma!136
Diffstat (limited to 'test/web/twitter_api/twitter_api_controller_test.exs')
-rw-r--r--test/web/twitter_api/twitter_api_controller_test.exs16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs
index 406dace1c..c239239d3 100644
--- a/test/web/twitter_api/twitter_api_controller_test.exs
+++ b/test/web/twitter_api/twitter_api_controller_test.exs
@@ -784,4 +784,20 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
assert status["id"] == activity.id
end
end
+
+ test "Convert newlines to <br> in bio", %{conn: conn} do
+ user = insert(:user)
+
+ conn =
+ conn
+ |> assign(:user, user)
+ |> post("/api/account/update_profile.json", %{
+ "description" => "Hello,\r\nWorld! I\n am a test."
+ })
+
+ user = Repo.get!(User, user.id)
+ assert user.bio == "Hello,<br>World! I<br> am a test."
+ end
+
+
end