X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fconfig%2Fconfig_db_test.exs;h=336de735900b12806295cfb2810ae855e97af477;hb=e1b07402ab077899dd5b9c0023fbe1c48af259e9;hp=6b0e7b4b64c4b5606ae8377ee01ddbb08363c8e2;hpb=5e365448f3fed98da0395ad69c9325795a85a12d;p=akkoma diff --git a/test/config/config_db_test.exs b/test/config/config_db_test.exs index 6b0e7b4b6..336de7359 100644 --- a/test/config/config_db_test.exs +++ b/test/config/config_db_test.exs @@ -43,11 +43,9 @@ defmodule Pleroma.ConfigDBTest do {ConfigDB.from_string(saved.key), ConfigDB.from_binary(saved.value)} ] - assert config[:quack] == [ - level: :info, - meta: [:none], - webhook_url: "https://hooks.slack.com/services/KEY/some_val" - ] + assert config[:quack][:level] == :info + assert config[:quack][:meta] == [:none] + assert config[:quack][:webhook_url] == "https://hooks.slack.com/services/KEY/some_val" end describe "update_or_create/1" do @@ -478,6 +476,14 @@ defmodule Pleroma.ConfigDBTest do assert ConfigDB.from_binary(binary) == [key: "value"] end + test "keyword with partial_chain key" do + binary = + ConfigDB.transform([%{"tuple" => [":partial_chain", "&:hackney_connect.partial_chain/1"]}]) + + assert binary == :erlang.term_to_binary(partial_chain: &:hackney_connect.partial_chain/1) + assert ConfigDB.from_binary(binary) == [partial_chain: &:hackney_connect.partial_chain/1] + end + test "keyword" do binary = ConfigDB.transform([