diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-07-13 13:32:21 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-07-13 13:32:21 -0500 |
commit | 80c21100db306ce45856bbdb97d3439676babeeb (patch) | |
tree | d143f523da262df5176220fbe6dc0b6370c91ebc /test/support/http_request_mock.ex | |
parent | ce85db41a30d95555bbd44d8931c4a3a357938d8 (diff) | |
parent | 5d215fd81f529b639db9096ca71d4e7f0a6ed386 (diff) | |
download | pleroma-80c21100db306ce45856bbdb97d3439676babeeb.tar.gz pleroma-80c21100db306ce45856bbdb97d3439676babeeb.zip |
Merge branch 'develop' into refactor/notification_settings
Diffstat (limited to 'test/support/http_request_mock.ex')
-rw-r--r-- | test/support/http_request_mock.ex | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 3d5128835..19a202654 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://framatube.org/accounts/framasoft", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/https___framatube.org_accounts_framasoft.json") + }} + end + + def get("https://framatube.org/videos/watch/6050732a-8a7a-43d4-a6cd-809525a1d206", _, _, _) do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/framatube.org-video.json") + }} + end + def get("https://peertube.social/accounts/craigmaloney", _, _, _) do {:ok, %Tesla.Env{ @@ -1326,6 +1342,18 @@ defmodule HttpRequestMock do {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/relay/relay.json")}} end + def get("http://localhost:4001/", _, "", Accept: "text/html") do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/7369654.html")}} + end + + def get("https://osada.macgirvin.com/", _, "", Accept: "text/html") do + {:ok, + %Tesla.Env{ + status: 200, + body: File.read!("test/fixtures/tesla_mock/https___osada.macgirvin.com.html") + }} + end + def get(url, query, body, headers) do {:error, "Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{ |