Update pleroma.nginx
[akkoma] / test / web / web_finger / web_finger_test.exs
index 69216f3935334606ece82542988af08679154665..99bf210ea54d957e613182543436909a204a037e 100644 (file)
@@ -49,6 +49,14 @@ defmodule Pleroma.Web.WebFingerTest do
       {:ok, _data} = WebFinger.finger(user)
     end
 
+    test "returns the ActivityPub actor URI for an ActivityPub user with the ld+json mimetype" do
+      user = "kaniini@gerzilla.de"
+
+      {:ok, data} = WebFinger.finger(user)
+
+      assert data["ap_id"] == "https://gerzilla.de/channel/kaniini"
+    end
+
     test "returns the correctly for json ostatus users" do
       user = "winterdienst@gnusocial.de"
 
@@ -80,6 +88,12 @@ defmodule Pleroma.Web.WebFingerTest do
 
       assert template == "https://macgirvin.com/xrd/?uri={uri}"
     end
+
+    test "it gets the xrd endpoint for statusnet" do
+      {:ok, template} = WebFinger.find_lrdd_template("status.alpicola.com")
+
+      assert template == "http://status.alpicola.com/main/xrd?uri={uri}"
+    end
   end
 
   describe "ensure_keys_present" do