diff --git a/priv/templates/phx.gen.auth/confirmation_live_test.exs b/priv/templates/phx.gen.auth/confirmation_live_test.exs index a206a394f5..fc31128821 100644 --- a/priv/templates/phx.gen.auth/confirmation_live_test.exs +++ b/priv/templates/phx.gen.auth/confirmation_live_test.exs @@ -29,7 +29,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web lv |> form("#confirmation_form") |> render_submit() - |> follow_redirect(conn, "/") + |> follow_redirect(conn, ~p"/") assert {:ok, conn} = result @@ -47,7 +47,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web lv |> form("#confirmation_form") |> render_submit() - |> follow_redirect(conn, "/") + |> follow_redirect(conn, ~p"/") assert {:ok, conn} = result @@ -65,7 +65,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web lv |> form("#confirmation_form") |> render_submit() - |> follow_redirect(conn, "/") + |> follow_redirect(conn, ~p"/") assert {:ok, conn} = result refute Phoenix.Flash.get(conn.assigns.flash, :error) diff --git a/priv/templates/phx.gen.auth/forgot_password_live_test.exs b/priv/templates/phx.gen.auth/forgot_password_live_test.exs index a249a694ec..4ad1455f6a 100644 --- a/priv/templates/phx.gen.auth/forgot_password_live_test.exs +++ b/priv/templates/phx.gen.auth/forgot_password_live_test.exs @@ -39,7 +39,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web lv |> form("#reset_password_form", <%= schema.singular %>: %{"email" => <%= schema.singular %>.email}) |> render_submit() - |> follow_redirect(conn, "/") + |> follow_redirect(conn, ~p"/") assert Phoenix.Flash.get(conn.assigns.flash, :info) =~ "If your email is in our system" @@ -54,7 +54,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web lv |> form("#reset_password_form", <%= schema.singular %>: %{"email" => "unknown@example.com"}) |> render_submit() - |> follow_redirect(conn, "/") + |> follow_redirect(conn, ~p"/") assert Phoenix.Flash.get(conn.assigns.flash, :info) =~ "If your email is in our system" assert Repo.all(<%= inspect context.alias %>.<%= inspect schema.alias %>Token) == [] diff --git a/priv/templates/phx.gen.auth/login_live_test.exs b/priv/templates/phx.gen.auth/login_live_test.exs index 4555254b9c..6b9d14268b 100644 --- a/priv/templates/phx.gen.auth/login_live_test.exs +++ b/priv/templates/phx.gen.auth/login_live_test.exs @@ -18,7 +18,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web conn |> log_in_<%= schema.singular %>(<%= schema.singular %>_fixture()) |> live(~p"<%= schema.route_prefix %>/log_in") - |> follow_redirect(conn, "/") + |> follow_redirect(conn, ~p"/") assert {:ok, _conn} = result end diff --git a/priv/templates/phx.gen.auth/registration_live_test.exs b/priv/templates/phx.gen.auth/registration_live_test.exs index 170d5ff601..1d12468191 100644 --- a/priv/templates/phx.gen.auth/registration_live_test.exs +++ b/priv/templates/phx.gen.auth/registration_live_test.exs @@ -17,7 +17,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web conn |> log_in_<%= schema.singular %>(<%= schema.singular %>_fixture()) |> live(~p"<%= schema.route_prefix %>/register") - |> follow_redirect(conn, "/") + |> follow_redirect(conn, ~p"/") assert {:ok, _conn} = result end @@ -48,7 +48,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web assert redirected_to(conn) == ~p"/" # Now do a logged in request and assert on the menu - conn = get(conn, "/") + conn = get(conn, ~p"/") response = html_response(conn, 200) assert response =~ email assert response =~ "Settings"