Small wrapper module around Application.get_env/put_env
Same API as the old Pleroma.Config
This commit is contained in:
parent
36ca3c1b3e
commit
7d328c658d
4 changed files with 69 additions and 20 deletions
|
|
@ -16,22 +16,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
|
|||
end
|
||||
|
||||
test "with the relay disabled, it returns 404", %{conn: conn} do
|
||||
instance =
|
||||
Application.get_env(:pleroma, :instance)
|
||||
|> Keyword.put(:allow_relay, false)
|
||||
|
||||
Application.put_env(:pleroma, :instance, instance)
|
||||
Pleroma.Config.put([:instance, :allow_relay], false)
|
||||
|
||||
res =
|
||||
conn
|
||||
|> get(activity_pub_path(conn, :relay))
|
||||
|> json_response(404)
|
||||
|
||||
instance =
|
||||
Application.get_env(:pleroma, :instance)
|
||||
|> Keyword.put(:allow_relay, true)
|
||||
|
||||
Application.put_env(:pleroma, :instance, instance)
|
||||
Pleroma.Config.put([:instance, :allow_relay], true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue