diff options
author | lain <lain@soykaf.club> | 2019-05-04 15:00:45 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-05-04 15:00:45 +0200 |
commit | 6ad8ddfd290f0239956874ccc9dc181167e84647 (patch) | |
tree | 83c5b59d055d3b98c1ebbba66351b7cbdb49bd99 /test/support/http_request_mock.ex | |
parent | 629ad1766ce5da434bf095f6baa81a460334e1b2 (diff) | |
parent | d089ff24600455fefc17e91807c61ddc61ba107a (diff) | |
download | pleroma-6ad8ddfd290f0239956874ccc9dc181167e84647.tar.gz pleroma-6ad8ddfd290f0239956874ccc9dc181167e84647.zip |
Merge remote-tracking branch 'origin/develop' into feature/bbs
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r-- | test/support/http_request_mock.ex | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 78e8efc9d..5b355bfe6 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", _, @@ -679,6 +716,10 @@ defmodule HttpRequestMock do {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/lambadalambda.atom")}} end + def get("https://mastodon.social/users/lambadalambda", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/lambadalambda.json")}} + end + def get("https://social.heldscal.la/user/23211", _, _, Accept: "application/activity+json") do {:ok, Tesla.Mock.json(%{"id" => "https://social.heldscal.la/user/23211"}, status: 200)} end |