summaryrefslogtreecommitdiff
path: root/test/support/http_request_mock.ex
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2019-12-17 16:16:21 +0100
committerThomas Citharel <tcit@tcit.fr>2019-12-17 16:16:21 +0100
commitd2f1c4f658a8c995716aee3876cb46a0f48f99cb (patch)
tree511c593641a9c08d45ab8b53cc4c8b7beb1fcdc0 /test/support/http_request_mock.ex
parent38ad407395e838ddf1c11922806adc080af44d36 (diff)
downloadpleroma-d2f1c4f658a8c995716aee3876cb46a0f48f99cb.tar.gz
pleroma-d2f1c4f658a8c995716aee3876cb46a0f48f99cb.zip
Add ActivityPub Object Event type support
Adds Event support in the same way Video objects are handled, with the name of the object as message header. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
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 e3a621f49..f43de700d 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -308,6 +308,24 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://mobilizon.org/events/252d5816-00a3-4a89-a66f-15bf65c33e39", _, _,
+ Accept: "application/activity+json"
+ ) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/mobilizon.org-event.json")
+ }}
+ end
+
+ def get("https://mobilizon.org/@tcit", _, _, Accept: "application/activity+json") do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/mobilizon.org-user.json")
+ }}
+ end
+
def get("https://baptiste.gelez.xyz/@/BaptisteGelez", _, _, _) do
{:ok,
%Tesla.Env{