easy test fixes
This commit is contained in:
parent
77f3dc4614
commit
de5e5009ed
|
@ -97,7 +97,7 @@ defmodule PokemonCouture.AccountsTest do
|
|||
describe "change_user_registration/2" do
|
||||
test "returns a changeset" do
|
||||
assert %Ecto.Changeset{} = changeset = Accounts.change_user_registration(%User{})
|
||||
assert changeset.required == [:password, :email]
|
||||
assert changeset.required == [:password, :email, :username]
|
||||
end
|
||||
|
||||
test "allows fields to be set" do
|
||||
|
|
|
@ -22,7 +22,7 @@ defmodule PokemonCoutureWeb.UserConfirmationControllerTest do
|
|||
test "sends a new confirmation token", %{conn: conn, user: user} do
|
||||
conn =
|
||||
post(conn, Routes.user_confirmation_path(conn, :create), %{
|
||||
"user" => %{"email" => user.email}
|
||||
"user" => %{"username" => user.username}
|
||||
})
|
||||
|
||||
assert redirected_to(conn) == "/"
|
||||
|
@ -35,7 +35,7 @@ defmodule PokemonCoutureWeb.UserConfirmationControllerTest do
|
|||
|
||||
conn =
|
||||
post(conn, Routes.user_confirmation_path(conn, :create), %{
|
||||
"user" => %{"email" => user.email}
|
||||
"user" => %{"username" => user.username}
|
||||
})
|
||||
|
||||
assert redirected_to(conn) == "/"
|
||||
|
|
|
@ -33,7 +33,7 @@ defmodule PokemonCoutureWeb.UserResetPasswordControllerTest do
|
|||
test "does not send reset password token if email is invalid", %{conn: conn} do
|
||||
conn =
|
||||
post(conn, Routes.user_reset_password_path(conn, :create), %{
|
||||
"user" => %{"email" => "unknown@example.com"}
|
||||
"user" => %{"username" => "unknown"}
|
||||
})
|
||||
|
||||
assert redirected_to(conn) == "/"
|
||||
|
|
Loading…
Reference in New Issue