PhoenixApiToolkit.TestHelpers.clean_volatile_fields
You're seeing just the function
clean_volatile_fields
, go back to PhoenixApiToolkit.TestHelpers module for more information.
Specs
Remove volatile fields from maps in the data. Volatile fields like "id" mess up test comparisons. Recursively cleans maps and lists.
Examples
iex> my_data = [
...> %{
...> "updated_at" => 12345
...> },
...> %{
...> "some_thing" => [
...> %{
...> "id" => 1
...> },
...> 12345
...> ]
...> }
...> ]
iex> clean_volatile_fields(my_data)
[%{}, %{"some_thing" => [%{}, 12345]}]