logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

maps_test.exs (637B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2024 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.MapsTest do
  5. use Pleroma.DataCase, async: true
  6. alias Pleroma.Maps
  7. describe "filter_empty_values/1" do
  8. assert %{"bar" => "b", "ray" => ["foo"], "objs" => %{"a" => "b"}} ==
  9. Maps.filter_empty_values(%{
  10. "foo" => nil,
  11. "fooz" => "",
  12. "bar" => "b",
  13. "rei" => [],
  14. "ray" => ["foo"],
  15. "obj" => %{},
  16. "objs" => %{"a" => "b"}
  17. })
  18. end
  19. end