aboutsummaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorrinpatch <rin@patch.cx>2021-03-22 20:07:07 +0300
committerrinpatch <rin@patch.cx>2021-03-22 21:20:47 +0300
commitd3660b24d37862bb58cf309c582cfe7432fd7bb6 (patch)
treee82f7305c6362dc41d0a3d6119759cc2d491b822 /test/support
parent572363793f27895903a8c156fd614ec5c7493cd1 (diff)
downloadpleroma-d3660b24d37862bb58cf309c582cfe7432fd7bb6.tar.gz
Copy emoji in the subject from parent post
Sometimes people put emoji in the subject, which results in the subject looking broken if someone replies to it from a server that does not have the said emoji under the same shortcode. This patch solves the problem by extending the emoji set available in the summary to that of the parent post.
Diffstat (limited to 'test/support')
-rw-r--r--test/support/http_request_mock.ex9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index 1e98020f0..eb692fab5 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -1278,6 +1278,15 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://patch.cx/objects/a399c28e-c821-4820-bc3e-4afeb044c16f", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/emoji-in-summary.json"),
+ headers: activitypub_object_headers()
+ }}
+ end
+
def get(url, query, body, headers) do
{:error,
"Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{