diff options
author | lain <lain@soykaf.club> | 2024-03-18 10:35:02 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2024-03-18 10:35:02 +0000 |
commit | 2b71f4897fd95e2a6d95e092956266aea2a003db (patch) | |
tree | 026686b46650859a3dddba5df432562da0a5a724 /test/support/http_request_mock.ex | |
parent | d415686bb9248e1c5b8913b7c3b96f74e9b8f230 (diff) | |
parent | cf0aa1238ccd137219253d76355f2dc0f89679ac (diff) | |
download | pleroma-2b71f4897fd95e2a6d95e092956266aea2a003db.tar.gz pleroma-2b71f4897fd95e2a6d95e092956266aea2a003db.zip |
Merge branch 'develop' into 'bookmark-folders'
# Conflicts:
# docs/development/API/differences_in_mastoapi_responses.md
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r-- | test/support/http_request_mock.ex | 18 |
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)}"} |