X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsupport%2Fhttp_request_mock.ex;h=19a2026544963fa5eece3c5b35d69125efbfbda4;hb=49c4e2495357797caa82b4eb0a4d03e8c8dd2730;hp=3a95e92da3610b26fe62c73fe55afa0d52d06123;hpb=7ca83e71a91d6fbce672f8b3eed087a628bb0bb2;p=akkoma diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 3a95e92da..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{ @@ -1291,6 +1307,10 @@ defmodule HttpRequestMock do }} end + def get("https://example.org/emoji/firedfox.png", _, _, _) do + {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/image.jpg")}} + end + def get("https://skippers-bin.com/users/7v1w1r8ce6", _, _, _) do {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/sjw.json")}} end @@ -1322,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)}, #{