tests: add a testcase for matching osada users in the formatter
[akkoma] / test / support / httpoison_mock.ex
index d8b79abef9e2db524c53e922e7aefb51eb9a4098..75c78d70eb9bab1df201ce6bd270e5942d22dee7 100644 (file)
@@ -3,6 +3,27 @@ defmodule HTTPoisonMock do
 
   def get(url, body \\ [], headers \\ [])
 
+  def get("https://osada.macgirvin.com/channel/mike", _, _) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body:
+         File.read!("test/fixtures/httpoison_mock/https___osada.macgirvin.com_channel_mike.json")
+     }}
+  end
+
+  def get(
+        "https://osada.macgirvin.com/.well-known/webfinger?resource=acct:mike@osada.macgirvin.com",
+        _,
+        _
+      ) do
+    {:ok,
+     %Response{
+       status_code: 200,
+       body: File.read!("test/fixtures/httpoison_mock/mike@osada.macgirvin.com.json")
+     }}
+  end
+
   def get("https://info.pleroma.site/activity.json", _, _) do
     {:ok,
      %Response{