Testing authenticated routes in Live View

Hard to say without knowing the rest of your codebase, but here are some gotchas that have caught me:

  1. Incorrect test isolation, such that the user on that test connection is signed in (can happen in a number of ways if you’re trying to be too clever)
  2. You’ve overridden some behavior in ensure_authentication that isn’t protecting the page correctly.
  3. Defining the route higher up without authentication.

Have you verified it works outside the test?