aboutsummaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-04-02 12:47:40 +0000
committerlambda <lain@soykaf.club>2019-04-02 12:47:40 +0000
commit180b87257cae481d4d9ffc9f03a06268ad8df569 (patch)
treee74667283a46a4b2aa30657e4ef98537b54681f9 /test/support
parentce9284b36f20a7116289ce1a14aa96e31e294093 (diff)
parentf20e8d28de97e154ec43120cb4fc07e2792e955a (diff)
downloadpleroma-180b87257cae481d4d9ffc9f03a06268ad8df569.tar.gz
Merge branch 'bugfix/share-mastodon' into 'develop'
[OStatus] adds status to pleroma instance if the url given is a status See merge request pleroma/pleroma!1002
Diffstat (limited to 'test/support')
-rw-r--r--test/support/http_request_mock.ex37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index 78e8efc9d..d3b547d91 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -36,6 +36,43 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://mastodon.social/users/emelie/statuses/101849165031453009", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/httpoison_mock/status.emelie.json")
+ }}
+ end
+
+ def get("https://mastodon.social/users/emelie", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/httpoison_mock/emelie.json")
+ }}
+ end
+
+ def get(
+ "https://mastodon.social/.well-known/webfinger?resource=https://mastodon.social/users/emelie",
+ _,
+ _,
+ _
+ ) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/httpoison_mock/webfinger_emelie.json")
+ }}
+ end
+
+ def get("https://mastodon.social/users/emelie.atom", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/httpoison_mock/emelie.atom")
+ }}
+ end
+
def get(
"https://osada.macgirvin.com/.well-known/webfinger?resource=acct:mike@osada.macgirvin.com",
_,