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
8 test "returns and halt the conn when federating is disabled" do
10 Application.get_env(:pleroma, :instance)
11 |> Keyword.put(:federating, false)
13 Application.put_env(:pleroma, :instance, instance)
17 |> Pleroma.Web.FederatingPlug.call(%{})
19 assert conn.status == 404
23 Application.get_env(:pleroma, :instance)
24 |> Keyword.put(:federating, true)
26 Application.put_env(:pleroma, :instance, instance)
29 test "does nothing when federating is enabled" do
32 |> Pleroma.Web.FederatingPlug.call(%{})