You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
413 B
Elixir
14 lines
413 B
Elixir
defmodule Asciinema.LoginControllerTest do
|
|
use Asciinema.ConnCase
|
|
|
|
test "with valid email", %{conn: conn} do
|
|
conn = post conn, "/login", %{login: %{email: "new@example.com"}}
|
|
assert redirected_to(conn, 302) == "/login/sent"
|
|
end
|
|
|
|
test "with invalid email", %{conn: conn} do
|
|
conn = post conn, "/login", %{login: %{email: "new@"}}
|
|
assert html_response(conn, 200) =~ "correct email"
|
|
end
|
|
end
|