Add OAuth controller tests
[akkoma] / test / support / httpoison_mock.ex
index e733afa59b3dacd6c0e8c9d303f515750d5bb7d4..6e8336a938ad5010fc9c80385386c8fa5402ee7b 100644 (file)
@@ -8,11 +8,11 @@ defmodule HTTPoisonMock do
         [Accept: "application/xrd+xml,application/jrd+json"],
         follow_redirect: true
       ) do
-     {:ok,
-      %Response{
-        status_code: 200,
-        body: File.read!("test/fixtures/httpoison_mock/kaniini@gerzilla.de.json")
-      }}
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/kaniini@gerzilla.de.json")
+     }}
   end
 
   def get(
@@ -531,6 +531,14 @@ defmodule HTTPoisonMock do
      }}
   end
 
+  def get("http://status.alpicola.com/.well-known/host-meta", [], follow_redirect: true) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/status.alpicola.com_host_meta")
+     }}
+  end
+
   def get("http://macgirvin.com/.well-known/host-meta", [], follow_redirect: true) do
     {:ok,
      %Response{
@@ -640,6 +648,18 @@ defmodule HTTPoisonMock do
      }}
   end
 
+  def get(
+        "https://hubzilla.example.org/channel/kaniini",
+        [Accept: "application/activity+json"],
+        _
+      ) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/kaniini@hubzilla.example.org.json")
+     }}
+  end
+
   def get("https://masto.quad.moe/users/_HellPie", [Accept: "application/activity+json"], _) do
     {:ok,
      %Response{