projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#1364] Resolved merge conflicts with `develop`.
[akkoma]
/
test
/
support
/
conn_case.ex
diff --git
a/test/support/conn_case.ex
b/test/support/conn_case.ex
index d6595f9714e72a8bb069b2877817d9daaf70d68e..06487420158ebed5412c15aa05800f4823207e6e 100644
(file)
--- a/
test/support/conn_case.ex
+++ b/
test/support/conn_case.ex
@@
-26,6
+26,8
@@
defmodule Pleroma.Web.ConnCase do
use Pleroma.Tests.Helpers
import Pleroma.Web.Router.Helpers
use Pleroma.Tests.Helpers
import Pleroma.Web.Router.Helpers
+ alias Pleroma.Config
+
# The default endpoint for testing
@endpoint Pleroma.Web.Endpoint
# The default endpoint for testing
@endpoint Pleroma.Web.Endpoint
@@
-50,7
+52,10
@@
defmodule Pleroma.Web.ConnCase do
end
defp ensure_federating_or_authenticated(conn, url, user) do
end
defp ensure_federating_or_authenticated(conn, url, user) do
- Pleroma.Config.put([:instance, :federating], false)
+ initial_setting = Config.get([:instance, :federating])
+ on_exit(fn -> Config.put([:instance, :federating], initial_setting) end)
+
+ Config.put([:instance, :federating], false)
conn
|> get(url)
conn
|> get(url)
@@
-61,7
+66,7
@@
defmodule Pleroma.Web.ConnCase do
|> get(url)
|> response(200)
|> get(url)
|> response(200)
-
Pleroma.
Config.put([:instance, :federating], true)
+ Config.put([:instance, :federating], true)
conn
|> get(url)
conn
|> get(url)