1 defmodule Pleroma.Web.FederatingPlugTest do
2 use Pleroma.Web.ConnCase
4 test "returns and halt the conn when federating is disabled" do
6 Application.get_env(:pleroma, :instance)
7 |> Keyword.put(:federating, false)
9 Application.put_env(:pleroma, :instance, instance)
13 |> Pleroma.Web.FederatingPlug.call(%{})
15 assert conn.status == 404
19 Application.get_env(:pleroma, :instance)
20 |> Keyword.put(:federating, true)
22 Application.put_env(:pleroma, :instance, instance)
25 test "does nothing when federating is enabled" do
28 |> Pleroma.Web.FederatingPlug.call(%{})