Programming Phoenix LiveView: P97 test authentication generation issue

Title: Programming Phoenix LiveView: P97 test authentication generation issue

I’m not familiar with the syntax (auth *) → mix test

If I run (auth *) → mix test
I get zsh: parse error near ‘-’

If I run mix test
22 tests fail and so far it seems to be because a user is not found.

One other note. I recently switched to asdf but so far everything has been working OK.

#errata/book-programming-phoenix-liveview

Resolved.

For some reason after running “mix phx.gen.auth Accounts User users”, the line “plug(:fetch_current_user)” wasn’t added in the router.ex. I started over and tried again with the same result. On a separate project, it worked fine.

I still don’t understand the command in the book for running tests:
(auth *) → mix test

If I just run mix test, now all tests pass.

Great to hear your tests are passing! the (auth *) is a designation of the branch that we were on when we copy/pasted that code from our terminal into the prose for this chapter. I’ll update that it should simply read mix test as you’ve found works.