X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fconfig%2Fconfig_db_test.exs;h=3895e2cdac32f7e0132a998625c45d22de744b52;hb=9c672ecbb5d4477cd16d2139a2cb66d3923ac5c8;hp=8d753e255ccffbd6dcf98e57399872633ac5ca60;hpb=23decaab81b900bff0f6eacad7ea6a894239e4ce;p=akkoma diff --git a/test/config/config_db_test.exs b/test/config/config_db_test.exs index 8d753e255..3895e2cda 100644 --- a/test/config/config_db_test.exs +++ b/test/config/config_db_test.exs @@ -43,7 +43,7 @@ defmodule Pleroma.ConfigDBTest do params = [ %{group: :pleroma, key: key2, value: "another_value"}, - %{group: :pleroma, key: config.key, value: "new_value"} + %{group: :pleroma, key: config.key, value: [a: 1, b: 2, c: "new_value"]} ] assert Repo.all(ConfigDB) |> length() == 1 @@ -55,7 +55,7 @@ defmodule Pleroma.ConfigDBTest do config1 = ConfigDB.get_by_params(%{group: config.group, key: config.key}) config2 = ConfigDB.get_by_params(%{group: :pleroma, key: key2}) - assert config1.value == "new_value" + assert config1.value == [a: 1, b: 2, c: "new_value"] assert config2.value == "another_value" end @@ -398,6 +398,10 @@ defmodule Pleroma.ConfigDBTest do ] end + test "trandformed keyword" do + assert ConfigDB.to_elixir_types(a: 1, b: 2, c: "string") == [a: 1, b: 2, c: "string"] + end + test "complex keyword with nested mixed childs" do assert ConfigDB.to_elixir_types([ %{"tuple" => [":uploader", "Pleroma.Uploaders.Local"]},