diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-02 07:39:19 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-02 07:39:19 +0300 |
commit | cf5ca7e45b7a5df18717c8b6ea0afa045e341f65 (patch) | |
tree | c586802831c88e484e770a8f62b402fa573485e3 /test/support | |
parent | 92efb888c7b25692af205b1a4dbce0ae689c439b (diff) | |
parent | ae921a0c24b9b1dcdea408decc691d66a538b6b8 (diff) | |
download | pleroma-cf5ca7e45b7a5df18717c8b6ea0afa045e341f65.tar.gz |
Merge remote-tracking branch 'remotes/origin/develop' into follow-request-notifications
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/captcha_mock.ex | 6 | ||||
-rw-r--r-- | test/support/http_request_mock.ex | 16 |
2 files changed, 21 insertions, 1 deletions
diff --git a/test/support/captcha_mock.ex b/test/support/captcha_mock.ex index 6dae94edf..7b0c1d5af 100644 --- a/test/support/captcha_mock.ex +++ b/test/support/captcha_mock.ex @@ -6,12 +6,16 @@ defmodule Pleroma.Captcha.Mock do alias Pleroma.Captcha.Service @behaviour Service + @solution "63615261b77f5354fb8c4e4986477555" + + def solution, do: @solution + @impl Service def new, do: %{ type: :mock, token: "afa1815e14e29355e6c8f6b143a39fa2", - answer_data: "63615261b77f5354fb8c4e4986477555", + answer_data: @solution, url: "https://example.org/captcha.png" } diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 20cb2b3d1..9624cb0f7 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -308,6 +308,22 @@ defmodule HttpRequestMock do }} end + def get("https://peertube.social/accounts/craigmaloney", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/craigmaloney.json") + }} + end + + def get("https://peertube.social/videos/watch/278d2b7c-0f38-4aaa-afe6-9ecc0c4a34fe", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/peertube-social.json") + }} + end + def get("https://mobilizon.org/events/252d5816-00a3-4a89-a66f-15bf65c33e39", _, _, [ {"accept", "application/activity+json"} ]) do |