diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-05-07 16:51:11 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-05-07 16:51:11 +0700 |
commit | 1557b99beb3b406572ef2d3baaabed1c9baeca1c (patch) | |
tree | 34041b8526ecfa38fcb0b471718de0b3b71aa8c4 /test/web/twitter_api/twitter_api_controller_test.exs | |
parent | c157e27a000a12dc8f660c056744a6611beb01b1 (diff) | |
parent | 6518644db1d31f2b30b95fa0899b3751bc330d56 (diff) | |
download | pleroma-1557b99beb3b406572ef2d3baaabed1c9baeca1c.tar.gz |
Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
Diffstat (limited to 'test/web/twitter_api/twitter_api_controller_test.exs')
-rw-r--r-- | test/web/twitter_api/twitter_api_controller_test.exs | 28 |
1 files changed, 28 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 43ad71a16..90718cfb4 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -1611,6 +1611,34 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do assert json_response(conn, 200) == UserView.render("user.json", %{user: user, for: user}) end + + # Broken before the change to class="emoji" and non-<img/> in the DB + @tag :skip + test "it formats emojos", %{conn: conn} do + user = insert(:user) + + conn = + conn + |> assign(:user, user) + |> post("/api/account/update_profile.json", %{ + "bio" => "I love our :moominmamma:" + }) + + assert response = json_response(conn, 200) + + assert %{ + "description" => "I love our :moominmamma:", + "description_html" => + ~s{I love our <img class="emoji" alt="moominmamma" title="moominmamma" src="} <> + _ + } = response + + conn = + conn + |> get("/api/users/show.json?user_id=#{user.nickname}") + + assert response == json_response(conn, 200) + end end defp valid_user(_context) do |