Merge branch 'develop' into 'feature/relay'
[akkoma] / test / support / httpoison_mock.ex
index a52d44ed6df2a4a58e11153ab9b163cdb5f15e4e..4ee2feb9572bceb32f6ec52b167a561536a6b369 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"],
@@ -752,6 +760,22 @@ defmodule HTTPoisonMock do
      }}
   end
 
+  def get("https://peertube.moe/videos/watch/df5f464b-be8d-46fb-ad81-2d4c2d1630e3", _, _) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/peertube.moe-vid.json")
+     }}
+  end
+
+  def get("https://peertube.moe/accounts/7even", _, _) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/7even.json")
+     }}
+  end
+
   def get(url, body, headers) do
     {:error,
      "Not implemented the mock response for get #{inspect(url)}, #{inspect(body)}, #{