Phoenix.LiveViewTest.follow_redirect

You're seeing just the macro follow_redirect, go back to Phoenix.LiveViewTest module for more information.
Link to this macro

follow_redirect(reason, conn, to \\ nil)

View Source (macro)

Follows the redirect from a render_* action.

Imagine you have a LiveView that redirects on a render_click event. You can make it sure it immediately redirects after the render_click action by calling follow_redirect/3:

live_view
|> render_click("redirect")
|> follow_redirect(conn)

follow_redirect/3 expects a connection as second argument. This is the connection that will be used to perform the underlying request.

If the LiveView redirects with a live redirect, this macro returns {:ok, live_view, disconnected_html} with the content of the new LiveView, the same as the live/3 macro. If the LiveView redirects with a regular redirect, this macro returns {:ok, conn} with the rendered redirected page. In any other case, this macro raises.

Finally, note that you can optionally assert on the path you are being redirected to by passing a third argument:

live_view
|> render_click("redirect")
|> follow_redirect(conn, "/redirected/page")