diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2018-07-12 19:52:17 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2018-07-12 23:08:28 +0200 |
commit | 24b5a75d096387ac63b30a09c1a6d8a986eceb61 (patch) | |
tree | 63649c130087073e3a1b8c2f4dddff38255801a5 /test/support | |
parent | d93789dfde3c44c76a56732088a897ddddfe9716 (diff) | |
download | pleroma-24b5a75d096387ac63b30a09c1a6d8a986eceb61.tar.gz |
Add test for Plume Articles
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/httpoison_mock.ex | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/support/httpoison_mock.ex b/test/support/httpoison_mock.ex index befebad8a..a52d44ed6 100644 --- a/test/support/httpoison_mock.ex +++ b/test/support/httpoison_mock.ex @@ -736,6 +736,22 @@ defmodule HTTPoisonMock do }} end + def get("https://baptiste.gelez.xyz/~/PlumeDevelopment/this-month-in-plume-june-2018/", _, _) do + {:ok, + %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/baptiste.gelex.xyz-article.json") + }} + end + + def get("https://baptiste.gelez.xyz/@/BaptisteGelez", _, _) do + {:ok, + %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/baptiste.gelex.xyz-user.json") + }} + end + def get(url, body, headers) do {:error, "Not implemented the mock response for get #{inspect(url)}, #{inspect(body)}, #{ |