aboutsummaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-01-26 15:47:52 +0000
committerkaniini <nenolod@gmail.com>2019-01-26 15:47:52 +0000
commite91f867cc9f372da2262a3ac95a23bc12266595a (patch)
tree359cefdf58a23900353015b36b0bdb3c33c35a93 /test/support
parentc00fba4f7dcf10c49bf1fa03be348e7c99a3fc47 (diff)
parent1f7843b9b8afcb559c8ba59388724dbf4ef3e3c9 (diff)
downloadpleroma-e91f867cc9f372da2262a3ac95a23bc12266595a.tar.gz
Merge branch 'features/mastoapi-cards' into 'develop'
MastoAPI: Add Rich-Media support See merge request pleroma/pleroma!664
Diffstat (limited to 'test/support')
-rw-r--r--test/support/http_request_mock.ex8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index e4279e14d..3043d2be6 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -653,6 +653,14 @@ defmodule HttpRequestMock do
{:ok, Tesla.Mock.json(%{"id" => "https://social.heldscal.la/user/23211"}, status: 200)}
end
+ def get("http://example.com/ogp", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}}
+ end
+
+ def get("http://example.com/empty", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: "hello"}}
+ end
+
def get(url, query, body, headers) do
{:error,
"Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{