1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Plugs.FederatingPlugTest do
6 use Pleroma.Web.ConnCase
8 setup do: clear_config([:instance, :federating])
10 test "returns and halt the conn when federating is disabled" do
11 clear_config([:instance, :federating], false)
15 |> Pleroma.Web.Plugs.FederatingPlug.call(%{})
17 assert conn.status == 404
21 test "does nothing when federating is enabled" do
22 clear_config([:instance, :federating], true)
26 |> Pleroma.Web.Plugs.FederatingPlug.call(%{})