diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-01-31 15:07:49 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-01-31 15:07:49 +0700 |
commit | d3677d2b4d4d53619777509e0169bb0764213d39 (patch) | |
tree | c93f81bd476ba1feee727dd16d72593968aa3648 /test/support | |
parent | ab31adf15bbec1597a9b7cf065898fb3f712eef3 (diff) | |
parent | 95d6118090fbd36fca4fd62133b270eaf27ae4df (diff) | |
download | pleroma-d3677d2b4d4d53619777509e0169bb0764213d39.tar.gz |
Merge remote-tracking branch 'MAIN/develop' into feature/jobs
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)}, #{ |