Merge remote-tracking branch 'MAIN/develop' into feature/jobs
[akkoma] / test / support / http_request_mock.ex
index e4279e14d5377477dd4e6357aab4097fcc003b74..3043d2be6953b31686f04ceb2f5ebbf920829c37 100644 (file)
@@ -653,6 +653,14 @@ defmodule HttpRequestMock do
     {:ok, Tesla.Mock.json(%{"id" => "https://social.heldscal.la/user/23211"}, status: 200)}
   end
 
+  def get("http://example.com/ogp", _, _, _) do
+    {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}}
+  end
+
+  def get("http://example.com/empty", _, _, _) do
+    {:ok, %Tesla.Env{status: 200, body: "hello"}}
+  end
+
   def get(url, query, body, headers) do
     {:error,
      "Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{