View Source Rolex.DataCase (Rolex v0.1.1)

Summary

Functions

A helper that transforms changeset errors into a map of messages.

Sets up the sandbox based on the test tags.

Functions

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)

Sets up the sandbox based on the test tags.