summaryrefslogtreecommitdiff
path: root/test/support/http_request_mock.ex
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-04-14 18:59:04 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-05-14 09:59:56 +0200
commite688d4ee69dfbda0f8fd3a5544720a566b3946c5 (patch)
treef0ab09a9d37972f2812b7718351f515835d40532 /test/support/http_request_mock.ex
parentd7d352b8692f2375a75357004fea78439950b5a7 (diff)
downloadpleroma-e688d4ee69dfbda0f8fd3a5544720a566b3946c5.tar.gz
pleroma-e688d4ee69dfbda0f8fd3a5544720a566b3946c5.zip
MRF.StealEmojiPolicy: New Policy
Inspired by https://git.pleroma.social/moonman/emoji-stealer-mrf/-/blob/master/steal_emoji_policy.ex
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r--test/support/http_request_mock.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index 3a95e92da..3d5128835 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -1291,6 +1291,10 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://example.org/emoji/firedfox.png", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/image.jpg")}}
+ end
+
def get("https://skippers-bin.com/users/7v1w1r8ce6", _, _, _) do
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/sjw.json")}}
end