X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fnode_info_test.exs;h=5981c70a727749ace802f99854e543a46b00659a;hb=4a278cd80a02fa1882db17397bb97b155c76570e;hp=a5b0b7869b8594a71e5912bc0bd34afe5d582d86;hpb=371d96b1da85960dafea9665b8bc32ba553b1555;p=akkoma diff --git a/test/web/node_info_test.exs b/test/web/node_info_test.exs index a5b0b7869..5981c70a7 100644 --- a/test/web/node_info_test.exs +++ b/test/web/node_info_test.exs @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2018 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Pleroma.Web.NodeInfoTest do use Pleroma.Web.ConnCase @@ -15,6 +19,17 @@ defmodule Pleroma.Web.NodeInfoTest do assert user.ap_id in result["metadata"]["staffAccounts"] end + test "nodeinfo shows restricted nicknames", %{conn: conn} do + conn = + conn + |> get("/nodeinfo/2.0.json") + + assert result = json_response(conn, 200) + + assert Pleroma.Config.get([Pleroma.User, :restricted_nicknames]) == + result["metadata"]["restrictedNicknames"] + end + test "returns 404 when federation is disabled", %{conn: conn} do instance = Application.get_env(:pleroma, :instance)