summaryrefslogtreecommitdiff
path: root/test/support/http_request_mock.ex
diff options
context:
space:
mode:
authorLain Soykaf <lain@lain.com>2024-03-19 16:26:02 +0400
committerLain Soykaf <lain@lain.com>2024-03-19 16:26:02 +0400
commit4e8a1b40cb7014a14d209d4438491a66246802b1 (patch)
tree25db7854e3d1b017a4abe2ae7b7687a744da82c6 /test/support/http_request_mock.ex
parent8a14fdbe479ca0ffb3419a83cf3c637b72dd54e0 (diff)
parent4e37cd85ef5b1134913441166219f09220fd4942 (diff)
downloadpleroma-4e8a1b40cb7014a14d209d4438491a66246802b1.tar.gz
pleroma-4e8a1b40cb7014a14d209d4438491a66246802b1.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into transient-validators-defaults
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r--test/support/http_request_mock.ex18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index f4b6f1f9f..f656c9412 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -1503,6 +1503,24 @@ defmodule HttpRequestMock do
{:ok, %Tesla.Env{status: 200, body: "hello"}}
end
+ def get("https://friends.grishka.me/posts/54642", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json"),
+ headers: activitypub_object_headers()
+ }}
+ end
+
+ def get("https://friends.grishka.me/users/1", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/smithereen_user.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)}, #{inspect(headers)}"}