aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-07-14 13:39:05 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-07-14 13:55:41 +0200
commitf00562ed6bef980bc14038b15078d3427876f7db (patch)
tree5687853c18b04f752e917b9d2562e7a1e0a0473b /test
parentefa9a13d4e27c797ae02a44ddc95fd81fea36804 (diff)
downloadpleroma-f00562ed6bef980bc14038b15078d3427876f7db.tar.gz
HttpRequestMock: Add 404s on OStatus fetching for info.pleroma.site
Diffstat (limited to 'test')
-rw-r--r--test/support/http_request_mock.ex12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index 80586426b..7811f7807 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -887,6 +887,10 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://info.pleroma.site/activity.json", _, _, _) do
+ {:ok, %Tesla.Env{status: 404, body: ""}}
+ end
+
def get("https://info.pleroma.site/activity2.json", _, _, Accept: "application/activity+json") do
{:ok,
%Tesla.Env{
@@ -895,6 +899,10 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://info.pleroma.site/activity2.json", _, _, _) do
+ {:ok, %Tesla.Env{status: 404, body: ""}}
+ end
+
def get("https://info.pleroma.site/activity3.json", _, _, Accept: "application/activity+json") do
{:ok,
%Tesla.Env{
@@ -903,6 +911,10 @@ defmodule HttpRequestMock do
}}
end
+ def get("https://info.pleroma.site/activity3.json", _, _, _) do
+ {:ok, %Tesla.Env{status: 404, body: ""}}
+ end
+
def get(url, query, body, headers) do
{:error,
"Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{