From d3f6814febb95f03af58543f4896599810f9b069 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 3 Sep 2018 14:40:14 +0000 Subject: [PATCH] tests: add test for staffAccounts presence in nodeinfo --- test/web/node_info_test.exs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/web/node_info_test.exs 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 -- 2.45.2