diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2019-07-12 18:08:27 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-07-12 18:08:27 +0300 |
commit | eae991b06a22bf7fc3eef7a0d5b409c931c1f6cb (patch) | |
tree | 77cd19ea54b8efa69e45b2d37876e7d5084cf38e /test/support/http_request_mock.ex | |
parent | 371d39e160efa51f2fe608e1788f6b11b89d9839 (diff) | |
parent | db75288b71e7531f8e5033f56fc0b9a7d1d8efb3 (diff) | |
download | pleroma-eae991b06a22bf7fc3eef7a0d5b409c931c1f6cb.tar.gz pleroma-eae991b06a22bf7fc3eef7a0d5b409c931c1f6cb.zip |
merge develop
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r-- | test/support/http_request_mock.ex | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index c593a5e4a..ff6bb78f9 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -840,6 +840,45 @@ defmodule HttpRequestMock do }} end + def get( + "https://zetsubou.xn--q9jyb4c/.well-known/webfinger?resource=lain@zetsubou.xn--q9jyb4c", + _, + _, + Accept: "application/xrd+xml,application/jrd+json" + ) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/lain.xml") + }} + end + + def get( + "https://zetsubou.xn--q9jyb4c/.well-known/webfinger?resource=https://zetsubou.xn--q9jyb4c/users/lain", + _, + _, + Accept: "application/xrd+xml,application/jrd+json" + ) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/lain.xml") + }} + end + + def get( + "https://zetsubou.xn--q9jyb4c/.well-known/host-meta", + _, + _, + _ + ) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/host-meta-zetsubou.xn--q9jyb4c.xml") + }} + end + def get(url, query, body, headers) do {:error, "Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{ |