Merge branch 'gun' into 'develop'
Gun adapter Closes #945 See merge request pleroma/pleroma!1861
This commit is contained in:
commit
ef7d2b0f11
77 changed files with 3343 additions and 511 deletions
|
|
@ -2369,9 +2369,6 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
|||
end
|
||||
|
||||
test "common config example", %{conn: conn} do
|
||||
adapter = Application.get_env(:tesla, :adapter)
|
||||
on_exit(fn -> Application.put_env(:tesla, :adapter, adapter) end)
|
||||
|
||||
conn =
|
||||
post(conn, "/api/pleroma/admin/config", %{
|
||||
configs: [
|
||||
|
|
@ -2384,23 +2381,16 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
|||
%{"tuple" => [":seconds_valid", 60]},
|
||||
%{"tuple" => [":path", ""]},
|
||||
%{"tuple" => [":key1", nil]},
|
||||
%{"tuple" => [":partial_chain", "&:hackney_connect.partial_chain/1"]},
|
||||
%{"tuple" => [":regex1", "~r/https:\/\/example.com/"]},
|
||||
%{"tuple" => [":regex2", "~r/https:\/\/example.com/u"]},
|
||||
%{"tuple" => [":regex3", "~r/https:\/\/example.com/i"]},
|
||||
%{"tuple" => [":regex4", "~r/https:\/\/example.com/s"]},
|
||||
%{"tuple" => [":name", "Pleroma"]}
|
||||
]
|
||||
},
|
||||
%{
|
||||
"group" => ":tesla",
|
||||
"key" => ":adapter",
|
||||
"value" => "Tesla.Adapter.Httpc"
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
assert Application.get_env(:tesla, :adapter) == Tesla.Adapter.Httpc
|
||||
assert Config.get([Pleroma.Captcha.NotReal, :name]) == "Pleroma"
|
||||
|
||||
assert json_response(conn, 200) == %{
|
||||
|
|
@ -2414,7 +2404,6 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
|||
%{"tuple" => [":seconds_valid", 60]},
|
||||
%{"tuple" => [":path", ""]},
|
||||
%{"tuple" => [":key1", nil]},
|
||||
%{"tuple" => [":partial_chain", "&:hackney_connect.partial_chain/1"]},
|
||||
%{"tuple" => [":regex1", "~r/https:\\/\\/example.com/"]},
|
||||
%{"tuple" => [":regex2", "~r/https:\\/\\/example.com/u"]},
|
||||
%{"tuple" => [":regex3", "~r/https:\\/\\/example.com/i"]},
|
||||
|
|
@ -2427,19 +2416,12 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
|||
":seconds_valid",
|
||||
":path",
|
||||
":key1",
|
||||
":partial_chain",
|
||||
":regex1",
|
||||
":regex2",
|
||||
":regex3",
|
||||
":regex4",
|
||||
":name"
|
||||
]
|
||||
},
|
||||
%{
|
||||
"group" => ":tesla",
|
||||
"key" => ":adapter",
|
||||
"value" => "Tesla.Adapter.Httpc",
|
||||
"db" => [":adapter"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue