From: lain Date: Sun, 29 Apr 2018 09:28:26 +0000 (+0200) Subject: Fix format. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=bc215f568473bb3801b6eff238fee48f5de2bab8;p=akkoma Fix format. --- diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex index e8fc9c291..960925f42 100644 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -347,7 +347,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do def update_profile(%{assigns: %{user: user}} = conn, params) do params = if bio = params["description"] do - bio_brs = Regex.replace(~r/\r?\n/,bio,"
") + bio_brs = Regex.replace(~r/\r?\n/, bio, "
") Map.put(params, "bio", bio_brs) else params diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index c239239d3..d7113979a 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -786,18 +786,16 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do end test "Convert newlines to
in bio", %{conn: conn} do - user = insert(:user) + user = insert(:user) - conn = - conn - |> assign(:user, user) - |> post("/api/account/update_profile.json", %{ - "description" => "Hello,\r\nWorld! I\n am a test." - }) + 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,
World! I
am a test." + user = Repo.get!(User, user.id) + assert user.bio == "Hello,
World! I
am a test." end - - end