diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2019-07-10 15:23:25 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-07-10 15:23:25 +0000 |
commit | a237c6a2d4b60a6f15429eb860b995ed2df8d327 (patch) | |
tree | 0553b82fcb5992d0694adefe7d1351c5ce9b4591 /test/support | |
parent | 3ff4a06ebe3b8fc8acaa29da0c9170d006b58987 (diff) | |
download | pleroma-a237c6a2d4b60a6f15429eb860b995ed2df8d327.tar.gz pleroma-a237c6a2d4b60a6f15429eb860b995ed2df8d327.zip |
support for idna domains
Diffstat (limited to 'test/support')
-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)}, #{ |