From c1d26751e6cd5fdfeb256e4b3ba81e1a7039894f Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 11 Feb 2018 17:19:06 +0100 Subject: Mocks: Add mastodon user json example. --- test/support/httpoison_mock.ex | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/support') 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 -- cgit v1.2.3