Merge branch 'develop' into 'feature/staff-discovery-api'
[akkoma] / test / web / node_info_test.exs
1 defmodule Pleroma.Web.NodeInfoTest do
2 use Pleroma.Web.ConnCase
3
4 import Pleroma.Factory
5
6 test "nodeinfo shows staff accounts", %{conn: conn} do
7 user = insert(:user, %{local: true, info: %{"is_moderator" => true}})
8
9 conn =
10 conn
11 |> get("/nodeinfo/2.0.json")
12
13 assert result = json_response(conn, 200)
14
15 assert user.ap_id in result["metadata"]["staffAccounts"]
16 end
17 end