summaryrefslogtreecommitdiff
path: root/test/web/admin_api/admin_api_controller_test.exs
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-01-18 16:55:33 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2020-01-18 17:14:50 +0300
commitefb8ef5abee1a8defa2bfba40ad1065db4c09ddf (patch)
tree92b14ebc386203dfc57864a1c2ec5375c03b20f1 /test/web/admin_api/admin_api_controller_test.exs
parente69986169095796f2845c4f859234d96f91bf9ff (diff)
downloadpleroma-efb8ef5abee1a8defa2bfba40ad1065db4c09ddf.tar.gz
pleroma-efb8ef5abee1a8defa2bfba40ad1065db4c09ddf.zip
releases support
Diffstat (limited to 'test/web/admin_api/admin_api_controller_test.exs')
-rw-r--r--test/web/admin_api/admin_api_controller_test.exs9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs
index cfa6207c2..eec1d0796 100644
--- a/test/web/admin_api/admin_api_controller_test.exs
+++ b/test/web/admin_api/admin_api_controller_test.exs
@@ -1965,13 +1965,16 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|> get("/api/pleroma/admin/config")
|> json_response(200)
- [%{"key" => ":emoji", "value" => emoji_val}, %{"key" => ":assets", "value" => assets_val}] =
+ vals =
Enum.filter(configs, fn %{"group" => group, "key" => key} ->
group == ":pleroma" and key in [config1.key, config2.key]
end)
- emoji_val = ConfigDB.transform_with_out_binary(emoji_val)
- assets_val = ConfigDB.transform_with_out_binary(assets_val)
+ emoji = Enum.find(vals, fn %{"key" => key} -> key == ":emoji" end)
+ assets = Enum.find(vals, fn %{"key" => key} -> key == ":assets" end)
+
+ emoji_val = ConfigDB.transform_with_out_binary(emoji["value"])
+ assets_val = ConfigDB.transform_with_out_binary(assets["value"])
assert emoji_val[:groups] == [a: 1, b: 2]
assert assets_val[:mascots] == [a: 1, b: 2]