mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 10:09:02 +00:00
tests: add test for staffAccounts presence in nodeinfo
This commit is contained in:
parent
9a21ff5f61
commit
d3f6814feb
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