mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-05 00:19:44 +00:00
Add mock.
This commit is contained in:
parent
81ea359a7c
commit
fc9d361d17
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue