aaronrenner / phx_gen_auth

An authentication system generator for Phoenix 1.5 applications.
774 stars 56 forks source link

Use Router helpers in test cases assertions #40

Closed chvanikoff closed 4 years ago

chvanikoff commented 4 years ago

Hi, I'd suggest changing generated test cases to assert against Routes.*_path rather than plain string - this way it becomes much easier to change routes like /users/login -> /auth/login. i.e.:

- assert redirected_to(conn) == "/users/login"
+ assert redirected_to(conn) == Routes.user_session_path(conn, :new)
josevalim commented 4 years ago

I agree. A PR is welcome!