X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fconfig%2Fconfig_db_test.exs;h=6b0e7b4b64c4b5606ae8377ee01ddbb08363c8e2;hb=a17bfb5fababbe25fa2abcfccd013c9f3edc2ef7;hp=61a0b1d5d5e5cf734049b60ef3119910dc626335;hpb=4c59e9477a601b5fff4ac1ee1483e0594b35a306;p=akkoma
diff --git a/test/config/config_db_test.exs b/test/config/config_db_test.exs
index 61a0b1d5d..6b0e7b4b6 100644
--- a/test/config/config_db_test.exs
+++ b/test/config/config_db_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ConfigDBTest do
@@ -307,6 +307,15 @@ defmodule Pleroma.ConfigDBTest do
assert ConfigDB.from_binary(binary) == Quack.Logger
end
+ test "Swoosh.Adapters modules" do
+ binary = ConfigDB.transform("Swoosh.Adapters.SMTP")
+ assert binary == :erlang.term_to_binary(Swoosh.Adapters.SMTP)
+ assert ConfigDB.from_binary(binary) == Swoosh.Adapters.SMTP
+ binary = ConfigDB.transform("Swoosh.Adapters.AmazonSES")
+ assert binary == :erlang.term_to_binary(Swoosh.Adapters.AmazonSES)
+ assert ConfigDB.from_binary(binary) == Swoosh.Adapters.AmazonSES
+ end
+
test "sigil" do
binary = ConfigDB.transform("~r[comp[lL][aA][iI][nN]er]")
assert binary == :erlang.term_to_binary(~r/comp[lL][aA][iI][nN]er/)
@@ -469,14 +478,6 @@ 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([