diff options
author | kaniini <nenolod@gmail.com> | 2019-01-26 15:47:52 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-01-26 15:47:52 +0000 |
commit | e91f867cc9f372da2262a3ac95a23bc12266595a (patch) | |
tree | 359cefdf58a23900353015b36b0bdb3c33c35a93 /test/support | |
parent | c00fba4f7dcf10c49bf1fa03be348e7c99a3fc47 (diff) | |
parent | 1f7843b9b8afcb559c8ba59388724dbf4ef3e3c9 (diff) | |
download | pleroma-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.ex | 8 |
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)}, #{ |