aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex S <alex.strizhakov@gmail.com>2019-06-22 09:01:30 +0300
committerAlex S <alex.strizhakov@gmail.com>2019-06-22 09:01:30 +0300
commitf0fccb75783bcac406133d8cb3d4d3a485189092 (patch)
treef6eb75d62523815c41a57ac148b519ea3cf2c95e /test
parentddd04d1c52a0ce7cc44f14c736cb2271ecf279e9 (diff)
downloadpleroma-f0fccb75783bcac406133d8cb3d4d3a485189092.tar.gz
fix for int and modules
Diffstat (limited to 'test')
-rw-r--r--test/web/admin_api/admin_api_controller_test.exs29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs
index 2a5912645..17a872b21 100644
--- a/test/web/admin_api/admin_api_controller_test.exs
+++ b/test/web/admin_api/admin_api_controller_test.exs
@@ -1463,5 +1463,34 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
assert Application.get_env(:pleroma, :keyaa1) == "another_value"
refute Application.get_env(:pleroma, :keyaa2)
end
+
+ test "common config example", %{conn: conn} do
+ conn =
+ post(conn, "/api/pleroma/admin/config", %{
+ configs: [
+ %{
+ "key" => "Pleroma.Captcha",
+ "value" => %{
+ "enabled" => ":false",
+ "method" => "Pleroma.Captcha.Kocaptcha",
+ "seconds_valid" => "i:60"
+ }
+ }
+ ]
+ })
+
+ assert json_response(conn, 200) == %{
+ "configs" => [
+ %{
+ "key" => "Pleroma.Captcha",
+ "value" => [
+ %{"enabled" => false},
+ %{"method" => "Pleroma.Captcha.Kocaptcha"},
+ %{"seconds_valid" => 60}
+ ]
+ }
+ ]
+ }
+ end
end
end