Added a test (written by @andrewzah) for the MR

This commit is contained in:
Wim Vanderbauwhede 2018-04-28 12:01:43 +01:00
parent 634c0c52a1
commit 6908f29e0a

View file

@ -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