diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-06-25 22:25:37 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-06-25 22:25:37 +0300 |
commit | 4ad15ad2a90ca1ac370c8a79f796adc603a90479 (patch) | |
tree | 055420375b3fa19c45c8390c1fac1600d7abb08a /test/support | |
parent | 0cb8e710fbceb6cc40295f433747e3997d510832 (diff) | |
download | pleroma-4ad15ad2a90ca1ac370c8a79f796adc603a90479.tar.gz |
add ignore hosts and TLDs for rich_media
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 f7f55a11a..30169edb0 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -757,6 +757,14 @@ defmodule HttpRequestMock do {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}} end + def get("https://example.com/ogp", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}} + end + + def get("https://pleroma.local/notice/9kCP7V", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}} + end + def get("http://example.com/ogp-missing-data", _, _, _) do {:ok, %Tesla.Env{ @@ -765,6 +773,14 @@ defmodule HttpRequestMock do }} end + def get("https://example.com/ogp-missing-data", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/rich_media/ogp-missing-data.html") + }} + end + def get("http://example.com/malformed", _, _, _) do {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/malformed-data.html")}} |