diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-08-25 08:03:25 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-08-25 08:03:25 +0200 |
commit | 211e1637705266bebd33735d4bb1809c0326f707 (patch) | |
tree | 7d8a6acf2ae22bb203649bfa16c004c32d6cf1cc /test/support | |
parent | e22737ffb5f7e7c567802e2bcef5520e2759e734 (diff) | |
download | pleroma-211e1637705266bebd33735d4bb1809c0326f707.tar.gz |
Implement missing mocks for rel=me
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/http_request_mock.ex | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 320244c75..c308e5a36 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -973,6 +973,22 @@ defmodule HttpRequestMock do }} end + def get("http://example.com/rel_me/anchor", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_anchor.html")}} + end + + def get("http://example.com/rel_me/anchor_nofollow", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_anchor_nofollow.html")}} + end + + def get("http://example.com/rel_me/link", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_link.html")}} + end + + def get("http://example.com/rel_me/null", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_null.html")}} + end + def get(url, query, body, headers) do {:error, "Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{ |