Browse Source

tests: add test for staffAccounts presence in nodeinfo

tags/v0.9.9
William Pitcock 5 years ago
parent
commit
d3f6814feb
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      test/web/node_info_test.exs

+ 17
- 0
test/web/node_info_test.exs 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

Loading…
Cancel
Save