summaryrefslogtreecommitdiff
path: root/test/support/http_request_mock.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-04-29 12:19:10 -0500
committerAlex Gleason <alex@alexgleason.me>2021-04-29 12:19:10 -0500
commite7ac15905e04ba33b0dd0ed32ab42cdea5dab8f9 (patch)
tree5cc9585793e2e020d75f90b99ebb91a71d56ee6b /test/support/http_request_mock.ex
parentb6a69b5efda5f75ad716252c69ae658a4e885b0a (diff)
parent115673bce773f91630c3bd4fd2d0023f92bee163 (diff)
downloadpleroma-e7ac15905e04ba33b0dd0ed32ab42cdea5dab8f9.tar.gz
pleroma-e7ac15905e04ba33b0dd0ed32ab42cdea5dab8f9.zip
Merge remote-tracking branch 'upstream/develop' into oauth-token-id
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r--test/support/http_request_mock.ex24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index eb692fab5..8807c2d14 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -89,6 +89,18 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://mastodon.sdf.org/users/rinpatch/collections/featured", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ File.read!("test/fixtures/users_mock/masto_featured.json")
+ |> String.replace("{{domain}}", "mastodon.sdf.org")
+ |> String.replace("{{nickname}}", "rinpatch"),
+ headers: [{"content-type", "application/activity+json"}]
+ }}
+ end
+
def get("https://patch.cx/objects/tesla_mock/poll_attachment", _, _, _) do
{:ok,
%Tesla.Env{
@@ -905,6 +917,18 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://mastodon.social/users/lambadalambda/collections/featured", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ File.read!("test/fixtures/users_mock/masto_featured.json")
+ |> String.replace("{{domain}}", "mastodon.social")
+ |> String.replace("{{nickname}}", "lambadalambda"),
+ headers: activitypub_object_headers()
+ }}
+ end
+
def get("https://apfed.club/channel/indio", _, _, _) do
{:ok,
%Tesla.Env{