1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.FederatingPlugTest do
6 use Pleroma.Web.ConnCase
7 clear_config_all([:instance, :federating])
9 test "returns and halt the conn when federating is disabled" do
10 Pleroma.Config.put([:instance, :federating], false)
14 |> Pleroma.Web.FederatingPlug.call(%{})
16 assert conn.status == 404
20 test "does nothing when federating is enabled" do
21 Pleroma.Config.put([:instance, :federating], true)
25 |> Pleroma.Web.FederatingPlug.call(%{})