diff options
author | lain <lain@soykaf.club> | 2019-08-25 16:12:13 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-08-25 16:12:13 +0000 |
commit | 5e7098cf69bc8d113279168f6bbc728c6f317727 (patch) | |
tree | a628ed6b9219199d2ce97233b3d0b104ab556fa6 /test/support/http_request_mock.ex | |
parent | 5853d9c8437a4c4a4e62dedaffbee5a01489cd9f (diff) | |
parent | f3b12662731fa8d1aa458ea16fb4bcb176b77744 (diff) | |
download | pleroma-5e7098cf69bc8d113279168f6bbc728c6f317727.tar.gz pleroma-5e7098cf69bc8d113279168f6bbc728c6f317727.zip |
Merge branch 'bugfix/rel_me_missing_mocks' into 'develop'
Implement missing mocks for rel=me
See merge request pleroma/pleroma!1598
Diffstat (limited to 'test/support/http_request_mock.ex')
-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 314b20a45..55b141dd8 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -971,6 +971,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)}, #{ |