mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
22 lines
637 B
Elixir
22 lines
637 B
Elixir
# 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
|