easy test fixes

This commit is contained in:
Lili (Tlapka) 2021-10-13 11:46:09 +02:00
parent 77f3dc4614
commit de5e5009ed
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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) == "/"

View File

@ -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) == "/"