summaryrefslogtreecommitdiff
path: root/test/support/httpoison_mock.ex
diff options
context:
space:
mode:
Diffstat (limited to 'test/support/httpoison_mock.ex')
-rw-r--r--test/support/httpoison_mock.ex22
1 files changed, 19 insertions, 3 deletions
diff --git a/test/support/httpoison_mock.ex b/test/support/httpoison_mock.ex
index 6e8336a93..a52d44ed6 100644
--- a/test/support/httpoison_mock.ex
+++ b/test/support/httpoison_mock.ex
@@ -4,7 +4,7 @@ defmodule HTTPoisonMock do
def get(url, body \\ [], headers \\ [])
def get(
- "http://gerzilla.de/.well-known/webfinger?resource=acct:kaniini@gerzilla.de",
+ "https://gerzilla.de/.well-known/webfinger?resource=acct:kaniini@gerzilla.de",
[Accept: "application/xrd+xml,application/jrd+json"],
follow_redirect: true
) do
@@ -16,7 +16,7 @@ defmodule HTTPoisonMock do
end
def get(
- "http://framatube.org/.well-known/webfinger?resource=acct:framasoft@framatube.org",
+ "https://framatube.org/.well-known/webfinger?resource=acct:framasoft@framatube.org",
[Accept: "application/xrd+xml,application/jrd+json"],
follow_redirect: true
) do
@@ -28,7 +28,7 @@ defmodule HTTPoisonMock do
end
def get(
- "http://gnusocial.de/.well-known/webfinger?resource=acct:winterdienst@gnusocial.de",
+ "https://gnusocial.de/.well-known/webfinger?resource=acct:winterdienst@gnusocial.de",
[Accept: "application/xrd+xml,application/jrd+json"],
follow_redirect: true
) do
@@ -736,6 +736,22 @@ defmodule HTTPoisonMock do
}}
end
+ def get("https://baptiste.gelez.xyz/~/PlumeDevelopment/this-month-in-plume-june-2018/", _, _) do
+ {:ok,
+ %Response{
+ status_code: 200,
+ body: File.read!("test/fixtures/httpoison_mock/baptiste.gelex.xyz-article.json")
+ }}
+ end
+
+ def get("https://baptiste.gelez.xyz/@/BaptisteGelez", _, _) do
+ {:ok,
+ %Response{
+ status_code: 200,
+ body: File.read!("test/fixtures/httpoison_mock/baptiste.gelex.xyz-user.json")
+ }}
+ end
+
def get(url, body, headers) do
{:error,
"Not implemented the mock response for get #{inspect(url)}, #{inspect(body)}, #{