Skip to content

Instantly share code, notes, and snippets.

@TylerPachal
Created February 11, 2020 21:01
Show Gist options
  • Save TylerPachal/11cbcac743d12068f33dc62c66b07440 to your computer and use it in GitHub Desktop.
Save TylerPachal/11cbcac743d12068f33dc62c66b07440 to your computer and use it in GitHub Desktop.
test "age is required" do
params = %{"name" => "tyler"}
changset = Person.changeset(%Person{}, params)
assert_invalid changeset, :age, error_message =~ "blank" && error_message =~ "please"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment