aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-02-18 10:21:19 +0100
committerlain <lain@soykaf.club>2018-02-18 10:21:19 +0100
commitfc9d361d17461bda2e2583578c8b9da944f3e66e (patch)
treea22f8e1f074b165f0c0f7c66b0f5b4a86f281e72
parent81ea359a7ce62a0d761b1b0348a1fccf5fe8e106 (diff)
downloadpleroma-fc9d361d17461bda2e2583578c8b9da944f3e66e.tar.gz
Add mock.
-rw-r--r--test/support/httpoison_mock.ex7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/support/httpoison_mock.ex b/test/support/httpoison_mock.ex
index 7ac4885e9..2b47b9b70 100644
--- a/test/support/httpoison_mock.ex
+++ b/test/support/httpoison_mock.ex
@@ -373,6 +373,13 @@ defmodule HTTPoisonMock do
}}
end
+ def get("http://mastodon.example.org/@admin/99541947525187367", ["Accept": "application/activity+json"], _) do
+ {:ok, %Response{
+ status_code: 200,
+ body: File.read!("test/fixtures/mastodon-note-object.json")
+ }}
+ end
+
def get(url, body, headers) do
{:error, "Not implemented the mock response for get #{inspect(url)}, #{inspect(body)}, #{inspect(headers)}"}
end