Skip to content

Instantly share code, notes, and snippets.

@lasseebert
Created October 17, 2016 21:27
Show Gist options
  • Select an option

  • Save lasseebert/f6b52c0b7de17df0de8a625a64dca441 to your computer and use it in GitHub Desktop.

Select an option

Save lasseebert/f6b52c0b7de17df0de8a625a64dca441 to your computer and use it in GitHub Desktop.
test "invalid email gives a 400 response" do
conn =
build_conn
|> post("/users", email: "Alice and Bob")
body = conn |> response(400) |> Poison.decode!
assert body["message"] == "email is invalid"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment