aboutsummaryrefslogtreecommitdiff
path: root/test/support/http_request_mock.ex
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2019-06-29 00:52:50 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2019-06-29 00:52:50 +0300
commit657277ffc0d3d25be4376ed629057a2d2cefb2e1 (patch)
tree3fdd4ca236669df9b2afc5bfcd0e5d6002e23666 /test/support/http_request_mock.ex
parentc0fa0001476a8a45878a0c75125627164497eddf (diff)
parentc6668c2e7b9908e479527914ca7eb2c838aaab06 (diff)
downloadpleroma-657277ffc0d3d25be4376ed629057a2d2cefb2e1.tar.gz
Resolve conflicts
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r--test/support/http_request_mock.ex40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index 67ef0928a..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")}}
@@ -802,6 +818,30 @@ defmodule HttpRequestMock do
}}
end
+ def post("http://mastodon.example.org/inbox", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: ""
+ }}
+ end
+
+ def post("https://hubzilla.example.org/inbox", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: ""
+ }}
+ end
+
+ def post("http://gs.example.org/index.php/main/salmon/user/1", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: ""
+ }}
+ end
+
def post("http://200.site" <> _, _, _, _) do
{:ok,
%Tesla.Env{