Mocks: Add mastodon user json example.

This commit is contained in:
Roger Braun 2018-02-11 17:19:06 +01:00
commit c1d26751e6
2 changed files with 8 additions and 0 deletions

View file

@ -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