New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"undefined function assigns/0" while trying to use Phoenix.LiveViewTest.rendered_to_string/1 #1798
Comments
I will see if I can improve the error message here but you always need to have an assigns variable set before using the ~H sigilx |
Thanks @josevalim. Yeah I'm aware that ~H needs
This wouldn't work, right? Something that might work instead would be:
So the docs need to be updated as far as I can see. I can come up with a little PR if you agree. |
Please send a PR for the docs, totally! |
PR is there |
Environment
Actual behavior
Just trying out
rendered_to_string
(https://hexdocs.pm/phoenix_live_view/Phoenix.LiveViewTest.html#rendered_to_string/1) iniex -S mix
, using the very same example as in the docs (nevermind the typo in the function name in the docs):Expected behavior
As in the docs:
<div>example</div>
Actual behavior
I've actually discovered this while trying to use
rendered_to_string
in a live component test.Is this a bug or am I forgetting something basic?
The text was updated successfully, but these errors were encountered: