[Credo] Change quoted string with 3+ quotes to sigils
This commit is contained in:
parent
c42d34b2ec
commit
23960309a0
3 changed files with 17 additions and 12 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue