Merge branch 'feature/update-welcome-setting-in-description' into 'develop'
[akkoma] / test / support / http_request_mock.ex
index 3d5128835be17f12f0c4c1e0ecb3cbac28e81f3e..eeeba7880da95927b5dac7c8f8450fff35077733 100644 (file)
@@ -82,6 +82,14 @@ defmodule HttpRequestMock do
      }}
   end
 
+  def get("https://patch.cx/objects/tesla_mock/poll_attachment", _, _, _) do
+    {:ok,
+     %Tesla.Env{
+       status: 200,
+       body: File.read!("test/fixtures/tesla_mock/poll_attachment.json")
+     }}
+  end
+
   def get(
         "https://mastodon.social/.well-known/webfinger?resource=https://mastodon.social/users/emelie",
         _,
@@ -308,6 +316,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 +1350,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)}, #{