diff options
Diffstat (limited to 'test/support/httpoison_mock.ex')
-rw-r--r-- | test/support/httpoison_mock.ex | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/support/httpoison_mock.ex b/test/support/httpoison_mock.ex index 420d42a0d..08b566fcd 100644 --- a/test/support/httpoison_mock.ex +++ b/test/support/httpoison_mock.ex @@ -87,6 +87,13 @@ defmodule HTTPoisonMock do }} end + def get("https://social.sakamoto.gq/users/eal/feed.atom", _body, _headers) do + {:ok, %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/sakamoto_eal_feed.atom") + }} + end + def get("http://gs.example.org/index.php/api/statuses/user_timeline/1.atom", _body, _headers) do {:ok, %Response{ status_code: 200, @@ -142,6 +149,13 @@ defmodule HTTPoisonMock do }} end + def get("https://social.sakamoto.gq/.well-known/webfinger", [Accept: "application/xrd+xml"], [params: [resource: "https://social.sakamoto.gq/users/eal"]]) do + {:ok, %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/eal_sakamoto.xml") + }} + end + def get("https://mamot.fr/users/Skruyb.atom", _, _) do {:ok, %Response{ status_code: 200, @@ -149,6 +163,14 @@ defmodule HTTPoisonMock do }} end + def get("https://social.sakamoto.gq/objects/0ccc1a2c-66b0-4305-b23a-7f7f2b040056", [Accept: "application/atom+xml"], _) do + {:ok, %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/sakamoto.atom") + }} + + end + def get(url, body, headers) do {:error, "Not implemented the mock response for get #{inspect(url)}, #{inspect(body)}, #{inspect(headers)}"} end |