aboutsummaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2018-02-11 17:19:06 +0100
committerRoger Braun <roger@rogerbraun.net>2018-02-11 17:19:06 +0100
commitc1d26751e6cd5fdfeb256e4b3ba81e1a7039894f (patch)
treed1b6ca8d758da6e2ac47985d65a2aef64991de73 /test/support
parent52200998c997576c9008cbe50b0a7b9f0e6134cc (diff)
downloadpleroma-c1d26751e6cd5fdfeb256e4b3ba81e1a7039894f.tar.gz
Mocks: Add mastodon user json example.
Diffstat (limited to 'test/support')
-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 21607ba95..7ac4885e9 100644
--- a/test/support/httpoison_mock.ex
+++ b/test/support/httpoison_mock.ex
@@ -366,6 +366,13 @@ defmodule HTTPoisonMock do
}}
end
+ def get("http://mastodon.example.org/users/admin", ["Accept": "application/activity+json"], _) do
+ {:ok, %Response{
+ status_code: 200,
+ body: File.read!("test/fixtures/httpoison_mock/admin@mastdon.example.org.json")
+ }}
+ end
+
def get(url, body, headers) do
{:error, "Not implemented the mock response for get #{inspect(url)}, #{inspect(body)}, #{inspect(headers)}"}
end