projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81ea359
)
Add mock.
author
lain
<lain@soykaf.club>
Sun, 18 Feb 2018 09:21:19 +0000
(10:21 +0100)
committer
lain
<lain@soykaf.club>
Sun, 18 Feb 2018 09:21:19 +0000
(10:21 +0100)
test/support/httpoison_mock.ex
patch
|
blob
|
history
diff --git
a/test/support/httpoison_mock.ex
b/test/support/httpoison_mock.ex
index 7ac4885e93d671ba1c271c838032d790609fb5ba..2b47b9b70c6a73a9ad44a0ab396200170987665d 100644
(file)
--- a/
test/support/httpoison_mock.ex
+++ b/
test/support/httpoison_mock.ex
@@
-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