X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Ftasks%2Fconfig_test.exs;h=04bc947a97643bfd4b50e4b31eccefe5f5e3c878;hb=e455ca3f3eee74db0b1e60550acf53bea915be3b;hp=b0c2efc984b47a99ab9ef9a285389f40208b5a90;hpb=0e27c274f4f68f3385753a2482d881bae7c35a06;p=akkoma diff --git a/test/tasks/config_test.exs b/test/tasks/config_test.exs index b0c2efc98..04bc947a9 100644 --- a/test/tasks/config_test.exs +++ b/test/tasks/config_test.exs @@ -20,7 +20,7 @@ defmodule Mix.Tasks.Pleroma.ConfigTest do :ok end - clear_config_all(:configurable_from_database, true) + setup_all do: clear_config(:configurable_from_database, true) test "error if file with custom settings doesn't exist" do Mix.Tasks.Pleroma.Config.migrate_to_db("config/not_existance_config_file.exs") @@ -38,7 +38,7 @@ defmodule Mix.Tasks.Pleroma.ConfigTest do on_exit(fn -> Application.put_env(:quack, :level, initial) end) end - test "settings are migrated to db" do + test "filtered settings are migrated to db" do assert Repo.all(ConfigDB) == [] Mix.Tasks.Pleroma.Config.migrate_to_db("test/fixtures/config/temp.secret.exs") @@ -47,6 +47,7 @@ defmodule Mix.Tasks.Pleroma.ConfigTest do config2 = ConfigDB.get_by_params(%{group: ":pleroma", key: ":second_setting"}) config3 = ConfigDB.get_by_params(%{group: ":quack", key: ":level"}) refute ConfigDB.get_by_params(%{group: ":pleroma", key: "Pleroma.Repo"}) + refute ConfigDB.get_by_params(%{group: ":postgrex", key: ":json_library"}) assert ConfigDB.from_binary(config1.value) == [key: "value", key2: [Repo]] assert ConfigDB.from_binary(config2.value) == [key: "value2", key2: ["Activity"]]