aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/web/node_info_test.exs17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/web/node_info_test.exs b/test/web/node_info_test.exs
new file mode 100644
index 000000000..d48f40e47
--- /dev/null
+++ b/test/web/node_info_test.exs
@@ -0,0 +1,17 @@
+defmodule Pleroma.Web.NodeInfoTest do
+ use Pleroma.Web.ConnCase
+
+ import Pleroma.Factory
+
+ test "nodeinfo shows staff accounts", %{conn: conn} do
+ user = insert(:user, %{local: true, info: %{"is_moderator" => true}})
+
+ conn =
+ conn
+ |> get("/nodeinfo/2.0.json")
+
+ assert result = json_response(conn, 200)
+
+ assert user.ap_id in result["metadata"]["staffAccounts"]
+ end
+end