[Credo] Change quoted string with 3+ quotes to sigils

This commit is contained in:
Haelwenn (lanodan) Monnier 2019-03-05 05:44:53 +01:00
commit 23960309a0
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
3 changed files with 17 additions and 12 deletions

View file

@ -101,10 +101,14 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
recipients: to
}
corndog_emojo = ~s(<img height="32px" width="32px" alt="2hu" title="2hu" src="corndog.png" />)
expected_html =
"<p>2hu <img height=\"32px\" width=\"32px\" alt=\"2hu\" title=\"2hu\" src=\"corndog.png\" /></p>alert('YAY')Some <img height=\"32px\" width=\"32px\" alt=\"2hu\" title=\"2hu\" src=\"corndog.png\" /> content mentioning <a href=\"#{
mentioned_user.ap_id
}\">@shp</a>"
~s(<p>2hu ) <>
corndog_emojo <>
~s(</p>alert\('YAY'\)Some ) <>
corndog_emojo <>
~s( content mentioning <a href=") <> mentioned_user.ap_id <> ~s(">@shp</a>)
expected_status = %{
"id" => activity.id,