Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Remove unused helper function

Uku Taht614e2eeb341c
diff --git a/test/support/data_case.ex b/test/support/data_case.ex
index 73b06dc4db..411c83ec35 100644
--- a/test/support/data_case.ex
+++ b/test/support/data_case.ex
@@ -33,20 +33,4 @@ defmodule Plausible.DataCase do
:ok
end
-
- @doc """
- A helper that transforms changeset errors into a map of messages.
-
- assert {:error, changeset} = Accounts.create_user(%{password: "short"})
- assert "password is too short" in errors_on(changeset).password
- assert %{password: ["password is too short"]} = errors_on(changeset)
-
- """
- def errors_on(changeset) do
- Ecto.Changeset.traverse_errors(changeset, fn {message, opts} ->
- Enum.reduce(opts, message, fn {key, value}, acc ->
- String.replace(acc, "%{#{key}}", to_string(value))
- end)
- end)
- end
end