PhoenixApiToolkit.TestHelpers.clean_volatile_fields

You're seeing just the function clean_volatile_fields, go back to PhoenixApiToolkit.TestHelpers module for more information.
Link to this function

clean_volatile_fields(data)

View Source

Specs

clean_volatile_fields(any()) :: any()

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]}]