tests: add test for staffAccounts presence in nodeinfo

This commit is contained in:
William Pitcock 2018-09-03 14:40:14 +00:00
parent 9a21ff5f61
commit d3f6814feb

View 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