Environment
- Elixir version (elixir -v): 1.19.5-otp-28
- Phoenix version (mix deps): 1.8.7
- Operating system: Linux (Manjaro - 7.0.3-1-MANJARO)
Actual behavior
After running mix phx.gen.auth, there's a mismatch between the generated LiveView templates and the test templates.
In test/myapp_web/live/user_live/login_test.exs, line 12, is the following:
assert html =~ "Register"
which results in:
Assertion with =~ failed
because the live template generated under /lib/myapp_web/live/user_live/login.ex contains:
Sign up instead of Register
Expected behavior
Test templates from phx.gen.auth should match their corresponding LiveView templates.
Solution
Inpriv/templates/phx.gen.auth/login_live_test.exs.eex, line 12:
Change
assert html =~ "Register"
to
assert html =~ "Sign up"
Test passes.
Environment
Actual behavior
After running mix phx.gen.auth, there's a mismatch between the generated LiveView templates and the test templates.
In
test/myapp_web/live/user_live/login_test.exs, line 12, is the following:assert html =~ "Register"which results in:
Assertion with =~ failedbecause the live template generated under
/lib/myapp_web/live/user_live/login.excontains:Sign upinstead ofRegisterExpected behavior
Test templates from phx.gen.auth should match their corresponding LiveView templates.
Solution
In
priv/templates/phx.gen.auth/login_live_test.exs.eex, line 12:Change
assert html =~ "Register"to
assert html =~ "Sign up"Test passes.