X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fconfig%2Fconfig_db_test.exs;h=336de735900b12806295cfb2810ae855e97af477;hb=7b02bfca51f95f56a5d12724b80b16019507cce9;hp=61a0b1d5d5e5cf734049b60ef3119910dc626335;hpb=dddebee047efc4ab1dff6565bef32954695846a7;p=akkoma
diff --git a/test/config/config_db_test.exs b/test/config/config_db_test.exs
index 61a0b1d5d..336de7359 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
@@ -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
@@ -307,6 +305,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/)