aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-03-05 05:44:53 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-03-13 04:26:56 +0100
commit23960309a0677eac1cca93cbff59b31bd7e19961 (patch)
tree38cda3131f5c7c7528c40170f5037702c625ed50 /test
parentc42d34b2ec2dacd9a038f721f7a817ee43cc0a4f (diff)
downloadpleroma-23960309a0677eac1cca93cbff59b31bd7e19961.tar.gz
[Credo] Change quoted string with 3+ quotes to sigils
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs7
-rw-r--r--test/web/twitter_api/representers/activity_representer_test.exs10
2 files changed, 11 insertions, 6 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 87b28e24e..059d5237d 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -1632,9 +1632,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
assert user = json_response(conn, 200)
assert user["note"] ==
- "I drink <a class=\"hashtag\" data-tag=\"cofe\" href=\"http://localhost:4001/tag/cofe\">#cofe</a> with <span class=\"h-card\"><a data-user=\"#{
- user2.id
- }\" class=\"u-url mention\" href=\"#{user2.ap_id}\">@<span>#{user2.nickname}</span></a></span>"
+ ~s(I drink <a class="hashtag" data-tag="cofe" href="http://localhost:4001/tag/cofe">#cofe</a> with <span class="h-card"><a data-user=") <>
+ user2.id <>
+ ~s(" class="u-url mention" href=") <>
+ user2.ap_id <> ~s(">@<span>) <> user2.nickname <> ~s(</span></a></span>)
end
test "updates the user's locking status", %{conn: conn} do
diff --git a/test/web/twitter_api/representers/activity_representer_test.exs b/test/web/twitter_api/representers/activity_representer_test.exs
index 03a15606a..d154385a0 100644
--- a/test/web/twitter_api/representers/activity_representer_test.exs
+++ b/test/web/twitter_api/representers/activity_representer_test.exs
@@ -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,