Merge branch 'so-long-twitterapi' into 'develop'
[akkoma] / test / support / http_request_mock.ex
index 320244c75219731a8817be478675daa21abed752..231e7c49839d3b372c543dc47da18c4b8f9ad62c 100644 (file)
@@ -18,8 +18,6 @@ defmodule HttpRequestMock do
       res
     else
       error ->
-        error = error
-
         with {:error, message} <- error do
           Logger.warn(message)
         end
@@ -777,6 +775,11 @@ defmodule HttpRequestMock do
     {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/lambadalambda.json")}}
   end
 
+  def get("https://apfed.club/channel/indio", _, _, _) do
+    {:ok,
+     %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/osada-user-indio.json")}}
+  end
+
   def get("https://social.heldscal.la/user/23211", _, _, Accept: "application/activity+json") do
     {:ok, Tesla.Mock.json(%{"id" => "https://social.heldscal.la/user/23211"}, status: 200)}
   end
@@ -973,6 +976,34 @@ defmodule HttpRequestMock do
      }}
   end
 
+  def get("http://example.com/rel_me/anchor", _, _, _) do
+    {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_anchor.html")}}
+  end
+
+  def get("http://example.com/rel_me/anchor_nofollow", _, _, _) do
+    {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_anchor_nofollow.html")}}
+  end
+
+  def get("http://example.com/rel_me/link", _, _, _) do
+    {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_link.html")}}
+  end
+
+  def get("http://example.com/rel_me/null", _, _, _) do
+    {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_null.html")}}
+  end
+
+  def get("https://skippers-bin.com/notes/7x9tmrp97i", _, _, _) do
+    {:ok,
+     %Tesla.Env{
+       status: 200,
+       body: File.read!("test/fixtures/tesla_mock/misskey_poll_no_end_date.json")
+     }}
+  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
+
   def get(url, query, body, headers) do
     {:error,
      "Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{