total rebase
[anni] / test / pleroma / maps_test.exs
diff --git a/test/pleroma/maps_test.exs b/test/pleroma/maps_test.exs
new file mode 100644 (file)
index 0000000..05f1b18
--- /dev/null
@@ -0,0 +1,22 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2024 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.MapsTest do
+  use Pleroma.DataCase, async: true
+
+  alias Pleroma.Maps
+
+  describe "filter_empty_values/1" do
+    assert %{"bar" => "b", "ray" => ["foo"], "objs" => %{"a" => "b"}} ==
+             Maps.filter_empty_values(%{
+               "foo" => nil,
+               "fooz" => "",
+               "bar" => "b",
+               "rei" => [],
+               "ray" => ["foo"],
+               "obj" => %{},
+               "objs" => %{"a" => "b"}
+             })
+  end
+end