Просмотр исходного кода

tests: add test for staffAccounts presence in nodeinfo

tags/v0.9.9
William Pitcock 5 лет назад
Родитель
Сommit
d3f6814feb
1 измененных файлов: 17 добавлений и 0 удалений
  1. +17
    -0
      test/web/node_info_test.exs

+ 17
- 0
test/web/node_info_test.exs Просмотреть файл

@@ -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

Загрузка…
Отмена
Сохранить