projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unit test for Pleroma API app controller
[akkoma]
/
lib
/
pleroma
/
application.ex
diff --git
a/lib/pleroma/application.ex
b/lib/pleroma/application.ex
index 06d399b2e3631493e0e7ca76ddc1236fd5fdb07d..9824e0a4ac3353ff195014cdcb591f6d1b809dda 100644
(file)
--- a/
lib/pleroma/application.ex
+++ b/
lib/pleroma/application.ex
@@
-25,7
+25,7
@@
defmodule Pleroma.Application do
if Process.whereis(Pleroma.Web.Endpoint) do
case Config.get([:http, :user_agent], :default) do
:default ->
if Process.whereis(Pleroma.Web.Endpoint) do
case Config.get([:http, :user_agent], :default) do
:default ->
- info = "#{Pleroma.Web.
base_
url()} <#{Config.get([:instance, :email], "")}>"
+ info = "#{Pleroma.Web.
Endpoint.
url()} <#{Config.get([:instance, :email], "")}>"
named_version() <> "; " <> info
custom ->
named_version() <> "; " <> info
custom ->
@@
-102,7
+102,7
@@
defmodule Pleroma.Application do
] ++
task_children(@mix_env) ++
dont_run_in_test(@mix_env) ++
] ++
task_children(@mix_env) ++
dont_run_in_test(@mix_env) ++
-
chat_child(cha
t_enabled?()) ++
+
shout_child(shou
t_enabled?()) ++
[Pleroma.Gopher.Server]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
[Pleroma.Gopher.Server]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
@@
-216,7
+216,7
@@
defmodule Pleroma.Application do
type: :worker
}
type: :worker
}
- defp
chat_enabled?, do: Config.get([:cha
t, :enabled])
+ defp
shout_enabled?, do: Config.get([:shou
t, :enabled])
defp dont_run_in_test(env) when env in [:test, :benchmark], do: []
defp dont_run_in_test(env) when env in [:test, :benchmark], do: []
@@
-237,14
+237,14
@@
defmodule Pleroma.Application do
]
end
]
end
- defp
cha
t_child(true) do
+ defp
shou
t_child(true) do
[
[
- Pleroma.Web.
ChatChannel.Cha
tChannelState,
+ Pleroma.Web.
ShoutChannel.Shou
tChannelState,
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
]
end
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
]
end
- defp
cha
t_child(_), do: []
+ defp
shou
t_child(_), do: []
defp task_children(:test) do
[
defp task_children(:test) do
[