Hacker News new | past | comments | ask | show | jobs | submit login

Do you test your controllers? I'm trying to find some good documentation on how to do that but get warnings to use `build_conn` instead of `conn` when using the example here: https://github.com/smpallen99/coherence/wiki/Testing-with-Co...



If you're getting that in a test, my guess is that you're not passing a context argument with `conn` in it to your test function (e.g. `test "foo", %{conn: conn} do`.

There's a deprecated `conn/0` function that you'll accidentally call instead if you forget to do this.


I don't generate my own controllers when installing Coherence. I just use the ones that come "out of the box."


`conn` is the old version, newer versions of Phoenix use `build_conn`. Just use that




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: