testsuite: formatting
[akkoma] / test / support / httpoison_mock.ex
index befebad8a798569697e7d6772f077619e62740ba..527c2e1f7f6ac6f03661f032fcc27f4dc03fb5ae 100644 (file)
@@ -3,6 +3,14 @@ defmodule HTTPoisonMock do
 
   def get(url, body \\ [], headers \\ [])
 
+  def get("https://puckipedia.com/", [Accept: "application/activity+json"], _) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/puckipedia.com.json")
+     }}
+  end
+
   def get(
         "https://gerzilla.de/.well-known/webfinger?resource=acct:kaniini@gerzilla.de",
         [Accept: "application/xrd+xml,application/jrd+json"],
@@ -736,6 +744,22 @@ defmodule HTTPoisonMock do
      }}
   end
 
+  def get("https://baptiste.gelez.xyz/~/PlumeDevelopment/this-month-in-plume-june-2018/", _, _) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/baptiste.gelex.xyz-article.json")
+     }}
+  end
+
+  def get("https://baptiste.gelez.xyz/@/BaptisteGelez", _, _) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/baptiste.gelex.xyz-user.json")
+     }}
+  end
+
   def get(url, body, headers) do
     {:error,
      "Not implemented the mock response for get #{inspect(url)}, #{inspect(body)}, #{