From fc9d361d17461bda2e2583578c8b9da944f3e66e Mon Sep 17 00:00:00 2001 From: lain Date: Sun, 18 Feb 2018 10:21:19 +0100 Subject: [PATCH] Add mock. --- test/support/httpoison_mock.ex | 7 +++++++ 1 file changed, 7 insertions(+) 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 @@ def get("http://mastodon.example.org/users/admin", ["Accept": "application/activ }} 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