Return visilility in twitter api, too.
[akkoma] / test / support / httpoison_mock.ex
index ad5171492db874f4fd023fc082412ab7cf800bc4..f28557975c7603ed5e74e0b5fce909c9fbb0fa33 100644 (file)
@@ -3,6 +3,18 @@ defmodule HTTPoisonMock do
 
   def get(url, body \\ [], headers \\ [])
 
+  def get(
+        "http://gerzilla.de/.well-known/webfinger?resource=acct:kaniini@gerzilla.de",
+        [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")
+     }}
+  end
+
   def get(
         "http://framatube.org/.well-known/webfinger?resource=acct:framasoft@framatube.org",
         [Accept: "application/xrd+xml,application/jrd+json"],
@@ -628,7 +640,11 @@ defmodule HTTPoisonMock do
      }}
   end
 
-  def get("https://hubzilla.example.org/channel/kaniini", [Accept: "application/activity+json"], _) do
+  def get(
+        "https://hubzilla.example.org/channel/kaniini",
+        [Accept: "application/activity+json"],
+        _
+      ) do
     {:ok,
      %Response{
        status_code: 200,