forked from AkkomaGang/akkoma
tests: add test for staffAccounts presence in nodeinfo
This commit is contained in:
parent
9a21ff5f61
commit
d3f6814feb
1 changed files with 17 additions and 0 deletions
17
test/web/node_info_test.exs
Normal file
17
test/web/node_info_test.exs
Normal file
|
@ -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
|
Loading…
Reference in a new issue